mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-06 16:38:36 +00:00
8160506: Use @implSpec tags in javax.lang.model.util
Reviewed-by: jjg
This commit is contained in:
parent
0cc565280e
commit
568bc5dbee
@ -113,7 +113,7 @@ public abstract class AbstractAnnotationValueVisitor6<R, P>
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation of this method in {@code
|
||||
* @implSpec The default implementation of this method in {@code
|
||||
* AbstractAnnotationValueVisitor6} will always throw {@code
|
||||
* UnknownAnnotationValueException}. This behavior is not
|
||||
* required of a subclass.
|
||||
@ -121,6 +121,7 @@ public abstract class AbstractAnnotationValueVisitor6<R, P>
|
||||
* @param av {@inheritDoc}
|
||||
* @param p {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public R visitUnknown(AnnotationValue av, P p) {
|
||||
throw new UnknownAnnotationValueException(av, p);
|
||||
}
|
||||
|
||||
@ -118,25 +118,28 @@ public abstract class AbstractElementVisitor6<R, P> implements ElementVisitor<R,
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p> The default implementation of this method in
|
||||
* @implSpec The default implementation of this method in
|
||||
* {@code AbstractElementVisitor6} will always throw
|
||||
* {@code UnknownElementException}.
|
||||
* This behavior is not required of a subclass.
|
||||
*
|
||||
* @param e the element to visit
|
||||
* @param p a visitor-specified parameter
|
||||
* @param e {@inheritDoc}
|
||||
* @param p {@inheritDoc}
|
||||
* @return a visitor-specified result
|
||||
* @throws UnknownElementException
|
||||
* a visitor implementation may optionally throw this exception
|
||||
*/
|
||||
@Override
|
||||
public R visitUnknown(Element e, P p) {
|
||||
throw new UnknownElementException(e, p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Visits a {@code ModuleElement} by calling {@code
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @implSpec Visits a {@code ModuleElement} by calling {@code
|
||||
* visitUnknown}.
|
||||
|
||||
*
|
||||
* @param e {@inheritDoc}
|
||||
* @param p {@inheritDoc}
|
||||
* @return the result of {@code visitUnknown}
|
||||
|
||||
@ -114,9 +114,11 @@ public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Visits a {@code UnionType} element by calling {@code
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @implSpec Visits a {@code UnionType} element by calling {@code
|
||||
* visitUnknown}.
|
||||
|
||||
*
|
||||
* @param t {@inheritDoc}
|
||||
* @param p {@inheritDoc}
|
||||
* @return the result of {@code visitUnknown}
|
||||
@ -128,15 +130,18 @@ public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Visits an {@code IntersectionType} element by calling {@code
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @implSpec Visits an {@code IntersectionType} element by calling {@code
|
||||
* visitUnknown}.
|
||||
|
||||
*
|
||||
* @param t {@inheritDoc}
|
||||
* @param p {@inheritDoc}
|
||||
* @return the result of {@code visitUnknown}
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@Override
|
||||
public R visitIntersection(IntersectionType t, P p) {
|
||||
return visitUnknown(t, p);
|
||||
}
|
||||
@ -144,16 +149,18 @@ public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p> The default implementation of this method in {@code
|
||||
* @implSpec The default implementation of this method in {@code
|
||||
* AbstractTypeVisitor6} will always throw {@code
|
||||
* UnknownTypeException}. This behavior is not required of a
|
||||
* subclass.
|
||||
*
|
||||
* @param t the type to visit
|
||||
* @param t {@inheritDoc}
|
||||
* @param p {@inheritDoc}
|
||||
* @return a visitor-specified result
|
||||
* @throws UnknownTypeException
|
||||
* a visitor implementation may optionally throw this exception
|
||||
*/
|
||||
@Override
|
||||
public R visitUnknown(TypeMirror t, P p) {
|
||||
throw new UnknownTypeException(t, p);
|
||||
}
|
||||
|
||||
@ -89,5 +89,6 @@ public abstract class AbstractTypeVisitor7<R, P> extends AbstractTypeVisitor6<R,
|
||||
* @param p {@inheritDoc}
|
||||
* @return the result of the visit as defined by a subclass
|
||||
*/
|
||||
@Override
|
||||
public abstract R visitUnion(UnionType t, P p);
|
||||
}
|
||||
|
||||
@ -88,5 +88,6 @@ public abstract class AbstractTypeVisitor8<R, P> extends AbstractTypeVisitor7<R,
|
||||
* @param p {@inheritDoc}
|
||||
* @return the result of the visit as defined by a subclass
|
||||
*/
|
||||
@Override
|
||||
public abstract R visitIntersection(IntersectionType t, P p);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user