JavaTM 2 Platform
Standard Ed. 6

接口 javax.lang.model.element.TypeElement
的使用

使用 TypeElement 的软件包
javax.annotation.processing 用来声明注释处理器并允许注释处理器与注释处理工具环境通信的工具。 
javax.lang.model.element 用于 Java 编程语言的模型元素的接口。 
javax.lang.model.util 用来帮助处理程序元素类型的实用工具。 
 

javax.annotation.processingTypeElement 的使用
 

参数类型为 TypeElementjavax.annotation.processing 中的方法
 Set<? extends Element> RoundEnvironment.getElementsAnnotatedWith(TypeElement a)
          返回使用给定注释类型注释的元素。
 

类型变量类型为 TypeElementjavax.annotation.processing 中的方法参数
abstract  boolean AbstractProcessor.process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
          处理先前 round 产生的类型元素上的注释类型集,并返回这些注释是否由此 Processor 声明。
 boolean Processor.process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
          处理先前 round 产生的类型元素上的注释类型集,并返回这些注释是否由此 Processor 声明。
 

javax.lang.model.elementTypeElement 的使用
 

参数类型为 TypeElementjavax.lang.model.element 中的方法
 R ElementVisitor.visitType(TypeElement e, P p)
          访问类型元素。
 

javax.lang.model.utilTypeElement 的使用
 

返回 TypeElementjavax.lang.model.util 中的方法
 TypeElement Types.boxedClass(PrimitiveType p)
          返回给定基本类型的装箱 (boxed) 值类型的类。
 TypeElement Elements.getTypeElement(CharSequence name)
          返回已给出其规范名称的类型元素。
 

返回变量类型为 TypeElement 的类型的 javax.lang.model.util 中的方法
static List<TypeElement> ElementFilter.typesIn(Iterable<? extends Element> elements)
          返回 elements 中类型的列表。
static Set<TypeElement> ElementFilter.typesIn(Set<? extends Element> elements)
          返回 elements 中类型的集合。
 

参数类型为 TypeElementjavax.lang.model.util 中的方法
 List<? extends Element> Elements.getAllMembers(TypeElement type)
          返回类型元素的所有成员,不管是继承的还是直接声明的。
 Name Elements.getBinaryName(TypeElement type)
          返回类型元素的二进制名称
 DeclaredType Types.getDeclaredType(DeclaredType containing, TypeElement typeElem, TypeMirror... typeArgs)
          根据给定的包含类型,返回对应于类型元素和实际类型参数的类型(它是给定包含类型的成员)。
 DeclaredType Types.getDeclaredType(TypeElement typeElem, TypeMirror... typeArgs)
          返回对应于类型元素和实际类型参数的类型。
 boolean Elements.overrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement type)
          测试一个方法(作为给定类型的成员)是否重写了另一个方法。
 R ElementKindVisitor6.visitType(TypeElement e, P p)
          访问类型元素,指派给用于特定的类型种类 ANNOTATION_TYPECLASSENUMINTERFACE 的 visit 方法。
 R ElementScanner6.visitType(TypeElement e, P p)
          访问类型元素。
 R SimpleElementVisitor6.visitType(TypeElement e, P p)
          访问类型元素。
 R ElementKindVisitor6.visitTypeAsAnnotationType(TypeElement e, P p)
          通过调用 defaultAction 访问 ANNOTATION_TYPE 类型元素。
 R ElementKindVisitor6.visitTypeAsClass(TypeElement e, P p)
          通过调用 defaultAction 访问 CLASS 类型元素。
 R ElementKindVisitor6.visitTypeAsEnum(TypeElement e, P p)
          通过调用 defaultAction 访问 ENUM 类型元素。
 R ElementKindVisitor6.visitTypeAsInterface(TypeElement e, P p)
          通过调用 defaultAction 访问 INTERFACE 类型元素。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only