- java.lang.Object
-
- javax.lang.model.util.AbstractElementVisitor6<R,P>
-
- javax.lang.model.util.SimpleElementVisitor6<R,P>
-
- javax.lang.model.util.ElementKindVisitor6<R,P>
-
- javax.lang.model.util.ElementKindVisitor7<R,P>
-
- javax.lang.model.util.ElementKindVisitor8<R,P>
-
- 参数类型
-
R-R-R: 对不需要返回结果的访问者使用Void。 -
P- 此访问者方法的附加参数类型。 对不需要附加参数的访问者使用Void。
- All Implemented Interfaces:
-
ElementVisitor<R,P>
- 已知直接子类:
-
ElementKindVisitor9
@SupportedSourceVersion(RELEASE_8) public class ElementKindVisitor8<R,P> extends ElementKindVisitor7<R,P>
程序元素的访问者基于他们的kind ,默认行为适用于RELEASE_8源版本。 对于elementsXyz可能有不止一种,则visitXyz方法在这个类代表对visitXyzAsKind对应的第一个参数的一种方法。visitXyzAsKind方法调用defaultAction,将其参数传递给defaultAction的相应参数。本课程中的方法可能会因其总体合同而被覆盖。 请注意,具有
@Override的具体子类中的注释方法将有助于确保按预期方式覆盖方法。警告:这个类实现的
ElementVisitor接口可能有添加的方法,或者在这种情况下使用的ElementKind枚举将来可能会添加常量,以适应新的,当前未知的语言结构,添加到Java的未来版本中编程语言 因此,以"visit"开头的方法可能会在以后添加到这个类中; 为了避免不兼容,扩展此类的类不应声明任何以"visit"开头的实例方法。当添加这种新的访问方法时,此类中的默认实现将是调用
visitUnknown方法。 还将引入一个新的抽象元素类访客类,以对应于新的语言级别; 该访问者对于访问方法将具有不同的默认行为。 当新访客被介绍时,全部或部分访问者可能会被弃用。- 从以下版本开始:
- 1.8
- 另请参见:
-
ElementKindVisitor6,ElementKindVisitor7,ElementKindVisitor9
-
-
Field Summary
-
Fields inherited from class javax.lang.model.util.SimpleElementVisitor6
DEFAULT_VALUE
-
-
构造方法摘要
构造方法 Modifier Constructor 描述 protectedElementKindVisitor8()具体子类的构造方法 使用null作为默认值。protectedElementKindVisitor8(R defaultValue)具体子类的构造方法 使用参数作为默认值。
-
方法摘要
-
Methods inherited from class javax.lang.model.util.AbstractElementVisitor6
visit, visit, visitModule, visitUnknown
-
Methods inherited from class javax.lang.model.util.ElementKindVisitor6
visitExecutable, visitExecutableAsConstructor, visitExecutableAsInstanceInit, visitExecutableAsMethod, visitExecutableAsStaticInit, visitPackage, visitType, visitTypeAsAnnotationType, visitTypeAsClass, visitTypeAsEnum, visitTypeAsInterface, visitTypeParameter, visitVariable, visitVariableAsEnumConstant, visitVariableAsExceptionParameter, visitVariableAsField, visitVariableAsLocalVariable, visitVariableAsParameter
-
Methods inherited from class javax.lang.model.util.ElementKindVisitor7
visitVariableAsResourceVariable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class javax.lang.model.util.SimpleElementVisitor6
defaultAction
-
-
-
-
构造方法详细信息
-
ElementKindVisitor8
protected ElementKindVisitor8()
具体子类的构造方法 使用null作为默认值。
-
ElementKindVisitor8
protected ElementKindVisitor8(R defaultValue)
具体子类的构造方法 使用参数作为默认值。- 参数
-
defaultValue- 要分配给SimpleElementVisitor6.DEFAULT_VALUE的值
-
-