langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java
changeset 39367 3a9d6e8c6fde
parent 25874 83c19f00452c
child 43147 823bfbf9e914
equal deleted inserted replaced
39366:8bf5fe72ca88 39367:3a9d6e8c6fde
   112     public final R visit(TypeMirror t) {
   112     public final R visit(TypeMirror t) {
   113         return t.accept(this, null);
   113         return t.accept(this, null);
   114     }
   114     }
   115 
   115 
   116     /**
   116     /**
   117      * Visits a {@code UnionType} element by calling {@code
   117      * {@inheritDoc}
       
   118      *
       
   119      * @implSpec Visits a {@code UnionType} element by calling {@code
   118      * visitUnknown}.
   120      * visitUnknown}.
   119 
   121      *
   120      * @param t  {@inheritDoc}
   122      * @param t  {@inheritDoc}
   121      * @param p  {@inheritDoc}
   123      * @param p  {@inheritDoc}
   122      * @return the result of {@code visitUnknown}
   124      * @return the result of {@code visitUnknown}
   123      *
   125      *
   124      * @since 1.7
   126      * @since 1.7
   126     public R visitUnion(UnionType t, P p) {
   128     public R visitUnion(UnionType t, P p) {
   127         return visitUnknown(t, p);
   129         return visitUnknown(t, p);
   128     }
   130     }
   129 
   131 
   130     /**
   132     /**
   131      * Visits an {@code IntersectionType} element by calling {@code
   133      * {@inheritDoc}
       
   134      *
       
   135      * @implSpec Visits an {@code IntersectionType} element by calling {@code
   132      * visitUnknown}.
   136      * visitUnknown}.
   133 
   137      *
   134      * @param t  {@inheritDoc}
   138      * @param t  {@inheritDoc}
   135      * @param p  {@inheritDoc}
   139      * @param p  {@inheritDoc}
   136      * @return the result of {@code visitUnknown}
   140      * @return the result of {@code visitUnknown}
   137      *
   141      *
   138      * @since 1.8
   142      * @since 1.8
   139      */
   143      */
       
   144     @Override
   140     public R visitIntersection(IntersectionType t, P p) {
   145     public R visitIntersection(IntersectionType t, P p) {
   141         return visitUnknown(t, p);
   146         return visitUnknown(t, p);
   142     }
   147     }
   143 
   148 
   144     /**
   149     /**
   145      * {@inheritDoc}
   150      * {@inheritDoc}
   146      *
   151      *
   147      * <p> The default implementation of this method in {@code
   152      * @implSpec The default implementation of this method in {@code
   148      * AbstractTypeVisitor6} will always throw {@code
   153      * AbstractTypeVisitor6} will always throw {@code
   149      * UnknownTypeException}.  This behavior is not required of a
   154      * UnknownTypeException}.  This behavior is not required of a
   150      * subclass.
   155      * subclass.
   151      *
   156      *
   152      * @param t  the type to visit
   157      * @param t  {@inheritDoc}
       
   158      * @param p  {@inheritDoc}
   153      * @return a visitor-specified result
   159      * @return a visitor-specified result
   154      * @throws UnknownTypeException
   160      * @throws UnknownTypeException
   155      *  a visitor implementation may optionally throw this exception
   161      *  a visitor implementation may optionally throw this exception
   156      */
   162      */
       
   163     @Override
   157     public R visitUnknown(TypeMirror t, P p) {
   164     public R visitUnknown(TypeMirror t, P p) {
   158         throw new UnknownTypeException(t, p);
   165         throw new UnknownTypeException(t, p);
   159     }
   166     }
   160 }
   167 }