Module org.eclipse.xtend.lib.macro
Interface TypeDeclaration
- All Superinterfaces:
AnnotationTarget,Declaration,Element,MemberDeclaration,NamedElement,Type
- All Known Subinterfaces:
AnnotationTypeDeclaration,ClassDeclaration,EnumerationTypeDeclaration,InterfaceDeclaration,MutableAnnotationTypeDeclaration,MutableClassDeclaration,MutableEnumerationTypeDeclaration,MutableInterfaceDeclaration,MutableTypeDeclaration
- Author:
- Sven Efftinge
-
Method Summary
Modifier and TypeMethodDescriptionfindDeclaredConstructor(TypeReference... parameterTypes) findDeclaredField(String name) findDeclaredMethod(String name, TypeReference... parameterTypes) findDeclaredType(String name) Iterable<? extends AnnotationTypeDeclaration> Iterable<? extends ClassDeclaration> Iterable<? extends ConstructorDeclaration> Iterable<? extends EnumerationTypeDeclaration> Iterable<? extends FieldDeclaration> Iterable<? extends InterfaceDeclaration> Iterable<? extends MemberDeclaration> Iterable<? extends MethodDeclaration> Iterable<? extends TypeDeclaration> Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.AnnotationTarget
findAnnotation, getAnnotationsMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.MemberDeclaration
getDeclaringType, getDocComment, getModifiers, getVisibility, isDeprecatedMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.NamedElement
getCompilationUnit, getSimpleNameMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.Type
getQualifiedName, isAssignableFrom
-
Method Details
-
getDeclaredMembers
Iterable<? extends MemberDeclaration> getDeclaredMembers()- Returns:
- the members directly declared and contained in the type declaration
-
getDeclaredMethods
Iterable<? extends MethodDeclaration> getDeclaredMethods()- Returns:
- the methods directly declared and contained in the type declaration
-
getDeclaredFields
Iterable<? extends FieldDeclaration> getDeclaredFields()- Returns:
- the fields directly declared and contained in the type declaration
-
getDeclaredConstructors
Iterable<? extends ConstructorDeclaration> getDeclaredConstructors()- Returns:
- the constructors directly declared and contained in the type declaration
-
getDeclaredClasses
Iterable<? extends ClassDeclaration> getDeclaredClasses()- Returns:
- the classes directly declared and contained in the type declaration
-
getDeclaredInterfaces
Iterable<? extends InterfaceDeclaration> getDeclaredInterfaces()- Returns:
- the interfaces directly declared and contained in the type declaration
-
getDeclaredEnumerationTypes
Iterable<? extends EnumerationTypeDeclaration> getDeclaredEnumerationTypes()- Returns:
- the enumeration types directly declared and contained in this type declaration
- Since:
- 2.8
-
getDeclaredAnnotationTypes
Iterable<? extends AnnotationTypeDeclaration> getDeclaredAnnotationTypes()- Returns:
- the annotation types directly declared and contained in this type declaration
- Since:
- 2.8
-
getDeclaredTypes
Iterable<? extends TypeDeclaration> getDeclaredTypes()- Returns:
- the types directly declared and contained in this type declaration
- Since:
- 2.8
-
findDeclaredField
- Parameters:
name- of the feature- Returns:
- the declared field with the given name or
nullof no such field exists.
-
findDeclaredType
- Parameters:
name- of the nested type- Returns:
- the declared, nested type with the given name or
nullof no such type exists. - Since:
- 2.8
-
findDeclaredMethod
- Parameters:
name- of the methodparameterTypes- - the types of the method- Returns:
- the declared method with the given name and the specified parameter types or
nullif no such method exists.
-
findDeclaredConstructor
- Parameters:
parameterTypes- - the parameter types of the constructor- Returns:
- the declared constructor with the exact same parameter types or
nullif no such constructors exists.
-