Documenting parameters in Javadoc
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 25 Aug 2013 10:51:50 +0200
changeset 25659202f396b49
parent 255 62f7dafef4cf
child 257 189752078751
Documenting parameters in Javadoc
context/src/main/java/org/apidesign/html/context/spi/Contexts.java
     1.1 --- a/context/src/main/java/org/apidesign/html/context/spi/Contexts.java	Sun Aug 25 09:36:33 2013 +0200
     1.2 +++ b/context/src/main/java/org/apidesign/html/context/spi/Contexts.java	Sun Aug 25 10:51:50 2013 +0200
     1.3 @@ -85,7 +85,7 @@
     1.4       * @author Jaroslav Tulach <jtulach@netbeans.org>
     1.5       */
     1.6      public static final class Builder {
     1.7 -        private CtxImpl impl = new CtxImpl();
     1.8 +        private final CtxImpl impl = new CtxImpl();
     1.9  
    1.10          Builder() {
    1.11          }
    1.12 @@ -94,12 +94,19 @@
    1.13           * exactly identified by its implementation class and can be associated
    1.14           * with (positive) priority. In case of presence of multiple technologies
    1.15           * with the same class, the one with higher lower priority takes precedence.
    1.16 +         * @param <Tech> type of technology to register
    1.17 +         * @param type the real class of the technology type
    1.18 +         * @param impl an instance of the technology class
    1.19 +         * @param position the lower position, the more important implementation 
    1.20 +         *    which will be consulted sooner when seeking for a {@link Contexts#find(net.java.html.BrwsrCtx, java.lang.Class)}
    1.21 +         *    an implementation
    1.22 +         * @return this builder
    1.23           */
    1.24 -        public <Tech> Builder register(Class<Tech> type, Tech impl, int priority) {
    1.25 -            if (priority <= 0) {
    1.26 +        public <Tech> Builder register(Class<Tech> type, Tech impl, int position) {
    1.27 +            if (position <= 0) {
    1.28                  throw new IllegalStateException();
    1.29              }
    1.30 -            this.impl.register(type, impl, priority);
    1.31 +            this.impl.register(type, impl, position);
    1.32              return this;
    1.33          }
    1.34