Interface TypeDeclaration
-
- All Superinterfaces:
AnnotationTarget,Declaration,Element,MemberDeclaration,NamedElement,Type
- All Known Subinterfaces:
AnnotationTypeDeclaration,ClassDeclaration,EnumerationTypeDeclaration,InterfaceDeclaration,MutableAnnotationTypeDeclaration,MutableClassDeclaration,MutableEnumerationTypeDeclaration,MutableInterfaceDeclaration,MutableTypeDeclaration
@Beta public interface TypeDeclaration extends Type, MemberDeclaration
- Noimplement:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.AnnotationTarget
findAnnotation, getAnnotations
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MemberDeclaration
getDeclaringType, getDocComment, getModifiers, getVisibility, isDeprecated
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.NamedElement
getCompilationUnit, getSimpleName
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.Type
getQualifiedName, isAssignableFrom
-
-
-
-
Method Detail
-
getDeclaredMembers
java.lang.Iterable<? extends MemberDeclaration> getDeclaredMembers()
- Returns:
- the members directly declared and contained in the type declaration
-
getDeclaredMethods
java.lang.Iterable<? extends MethodDeclaration> getDeclaredMethods()
- Returns:
- the methods directly declared and contained in the type declaration
-
getDeclaredFields
java.lang.Iterable<? extends FieldDeclaration> getDeclaredFields()
- Returns:
- the fields directly declared and contained in the type declaration
-
getDeclaredConstructors
java.lang.Iterable<? extends ConstructorDeclaration> getDeclaredConstructors()
- Returns:
- the constructors directly declared and contained in the type declaration
-
getDeclaredClasses
java.lang.Iterable<? extends ClassDeclaration> getDeclaredClasses()
- Returns:
- the classes directly declared and contained in the type declaration
-
getDeclaredInterfaces
java.lang.Iterable<? extends InterfaceDeclaration> getDeclaredInterfaces()
- Returns:
- the interfaces directly declared and contained in the type declaration
-
getDeclaredEnumerationTypes
java.lang.Iterable<? extends EnumerationTypeDeclaration> getDeclaredEnumerationTypes()
- Returns:
- the enumeration types directly declared and contained in this type declaration
- Since:
- 2.8
-
getDeclaredAnnotationTypes
java.lang.Iterable<? extends AnnotationTypeDeclaration> getDeclaredAnnotationTypes()
- Returns:
- the annotation types directly declared and contained in this type declaration
- Since:
- 2.8
-
getDeclaredTypes
java.lang.Iterable<? extends TypeDeclaration> getDeclaredTypes()
- Returns:
- the types directly declared and contained in this type declaration
- Since:
- 2.8
-
findDeclaredField
FieldDeclaration findDeclaredField(java.lang.String name)
- Parameters:
name- of the feature- Returns:
- the declared field with the given name or
nullof no such field exists.
-
findDeclaredType
TypeDeclaration findDeclaredType(java.lang.String name)
- 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
MethodDeclaration findDeclaredMethod(java.lang.String name, TypeReference... parameterTypes)
- 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
ConstructorDeclaration findDeclaredConstructor(TypeReference... parameterTypes)
- Parameters:
parameterTypes- - the parameter types of the constructor- Returns:
- the declared constructor with the exact same parameter types or
nullif no such constructors exists.
-
-