Save This Page
Home » openjdk-7 » javax.lang » model » util » [javadoc | source]
javax.lang.model.util
public class: ElementKindVisitor6 [javadoc | source]
java.lang.Object
   javax.lang.model.util.AbstractElementVisitor6<R, P>
      javax.lang.model.util.SimpleElementVisitor6<R, P>
         javax.lang.model.util.ElementKindVisitor6

All Implemented Interfaces:
    ElementVisitor

Direct Known Subclasses:
    ElementKindVisitor7

A visitor of program elements based on their {@linkplain ElementKind kind} with default behavior appropriate for the RELEASE_6 source version. For {@linkplain Element elements} XYZ that may have more than one kind, the visitXYZ methods in this class delegate to the visitXYZKind method corresponding to the first argument's kind. The visitXYZKind methods call defaultAction , passing their arguments to {@code defaultAction}'s corresponding parameters.

Methods in this class may be overridden subject to their general contract. Note that annotating methods in concrete subclasses with @Override will help ensure that methods are overridden as intended.

WARNING: The {@code ElementVisitor} interface implemented by this class may have methods added to it or the {@code ElementKind} {@code enum} used in this case may have constants added to it in the future to accommodate new, currently unknown, language structures added to future versions of the Java™ programming language. Therefore, methods whose names begin with {@code "visit"} may be added to this class in the future; to avoid incompatibilities, classes which extend this class should not declare any instance methods with names beginning with {@code "visit"}.

When such a new visit method is added, the default implementation in this class will be to call the visitUnknown method. A new abstract element kind visitor class will also be introduced to correspond to the new language level; this visitor will have different default behavior for the visit method in question. When the new visitor is introduced, all or portions of this visitor may be deprecated.

Fields inherited from javax.lang.model.util.SimpleElementVisitor6:
DEFAULT_VALUE
Constructor:
 protected ElementKindVisitor6() 
 protected ElementKindVisitor6(R defaultValue) 
Method from javax.lang.model.util.ElementKindVisitor6 Summary:
visitExecutable,   visitExecutableAsConstructor,   visitExecutableAsInstanceInit,   visitExecutableAsMethod,   visitExecutableAsStaticInit,   visitPackage,   visitType,   visitTypeAsAnnotationType,   visitTypeAsClass,   visitTypeAsEnum,   visitTypeAsInterface,   visitTypeParameter,   visitVariable,   visitVariableAsEnumConstant,   visitVariableAsExceptionParameter,   visitVariableAsField,   visitVariableAsLocalVariable,   visitVariableAsParameter,   visitVariableAsResourceVariable
Methods from javax.lang.model.util.SimpleElementVisitor6:
defaultAction,   visitExecutable,   visitPackage,   visitType,   visitTypeParameter,   visitVariable
Methods from javax.lang.model.util.AbstractElementVisitor6:
visit,   visit,   visitUnknown
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.lang.model.util.ElementKindVisitor6 Detail:
 public R visitExecutable(ExecutableElement e,
    P p) 
    Visits an executable element, dispatching to the visit method for the specific {@linkplain ElementKind kind} of executable, {@code CONSTRUCTOR}, {@code INSTANCE_INIT}, {@code METHOD}, or {@code STATIC_INIT}.
 public R visitExecutableAsConstructor(ExecutableElement e,
    P p) 
    Visits a {@code CONSTRUCTOR} executable element by calling {@code defaultAction}.
 public R visitExecutableAsInstanceInit(ExecutableElement e,
    P p) 
    Visits an {@code INSTANCE_INIT} executable element by calling {@code defaultAction}.
 public R visitExecutableAsMethod(ExecutableElement e,
    P p) 
    Visits a {@code METHOD} executable element by calling {@code defaultAction}.
 public R visitExecutableAsStaticInit(ExecutableElement e,
    P p) 
    Visits a {@code STATIC_INIT} executable element by calling {@code defaultAction}.
 public R visitPackage(PackageElement e,
    P p) 
    {@inheritDoc} The element argument has kind {@code PACKAGE}.
 public R visitType(TypeElement e,
    P p) 
    Visits a type element, dispatching to the visit method for the specific {@linkplain ElementKind kind} of type, {@code ANNOTATION_TYPE}, {@code CLASS}, {@code ENUM}, or {@code INTERFACE}.
 public R visitTypeAsAnnotationType(TypeElement e,
    P p) 
    Visits an {@code ANNOTATION_TYPE} type element by calling {@code defaultAction}.
 public R visitTypeAsClass(TypeElement e,
    P p) 
    Visits a {@code CLASS} type element by calling {@code defaultAction}.
 public R visitTypeAsEnum(TypeElement e,
    P p) 
    Visits an {@code ENUM} type element by calling {@code defaultAction}.
 public R visitTypeAsInterface(TypeElement e,
    P p) 
    Visits an {@code INTERFACE} type element by calling {@code defaultAction}. .
 public R visitTypeParameter(TypeParameterElement e,
    P p) 
    {@inheritDoc} The element argument has kind {@code TYPE_PARAMETER}.
 public R visitVariable(VariableElement e,
    P p) 
    Visits a variable element, dispatching to the visit method for the specific {@linkplain ElementKind kind} of variable, {@code ENUM_CONSTANT}, {@code EXCEPTION_PARAMETER}, {@code FIELD}, {@code LOCAL_VARIABLE}, {@code PARAMETER}, or {@code RESOURCE_VARIABLE}.
 public R visitVariableAsEnumConstant(VariableElement e,
    P p) 
    Visits an {@code ENUM_CONSTANT} variable element by calling {@code defaultAction}.
 public R visitVariableAsExceptionParameter(VariableElement e,
    P p) 
    Visits an {@code EXCEPTION_PARAMETER} variable element by calling {@code defaultAction}.
 public R visitVariableAsField(VariableElement e,
    P p) 
    Visits a {@code FIELD} variable element by calling {@code defaultAction}.
 public R visitVariableAsLocalVariable(VariableElement e,
    P p) 
    Visits a {@code LOCAL_VARIABLE} variable element by calling {@code defaultAction}.
 public R visitVariableAsParameter(VariableElement e,
    P p) 
    Visits a {@code PARAMETER} variable element by calling {@code defaultAction}.
 public R visitVariableAsResourceVariable(VariableElement e,
    P p) 
    Visits a {@code RESOURCE_VARIABLE} variable element by calling {@code visitUnknown}.