Top Description Methods
org.eclipse.xtend.lib.macro.services

public Interface TypeLookup

extends GlobalTypeLookup
Known Direct Subinterfaces
org.eclipse.xtend.lib.macro.TransformationContext, org.eclipse.xtend.lib.macro.ValidationContext
Annotations
@Beta
Imports
org.eclipse.xtend.lib.macro.declaration.CompilationUnit, .MutableAnnotationTypeDeclaration, .MutableClassDeclaration, .MutableEnumerationTypeDeclaration, .MutableInterfaceDeclaration, com.google.common.annotations.Beta

Facilities to lookup Java type declarations generated within the currently processed CompilationUnit as well as on the classpath of that CompilationUnit.
Author
Sven Efftinge

Method Summary

Modifier and TypeMethod and Description
public MutableAnnotationTypeDeclaration

Returns:

the MutableAnnotationTypeDeclaration with given qualified name, or null if no such class declaration is contained in the currently processed CompilationUnit
findAnnotationType
(String
the qualified name of the type to look up. Nested class delimiter is expected to be the '.' (dot).
qualifiedName
)

public MutableClassDeclaration

Returns:

the MutableClassDeclaration with given qualified name, or null if no such class declaration is contained in the currently processed CompilationUnit
findClass
(String
the qualified name of the type to look up. Nested class delimiter is expected to be the '.' (dot).
qualifiedName
)

public MutableEnumerationTypeDeclaration

Returns:

the MutableEnumerationTypeDeclaration with given qualified name, or null if no such class declaration is contained in the currently processed CompilationUnit
findEnumerationType
(String
the qualified name of the type to look up. Nested class delimiter is expected to be the '.' (dot).
qualifiedName
)

public MutableInterfaceDeclaration

Returns:

the MutableInterfaceDeclaration with given qualified name, or null if no such interface declaration is contained in the currently processed CompilationUnit
findInterface
(String
the qualified name of the type to look up. Nested class delimiter is expected to be the '.' (dot).
qualifiedName
)

Inherited from org.eclipse.xtend.lib.macro.services.GlobalTypeLookup:
findTypeGloballyfindTypeGlobally

Method Detail

findAnnotationTypeback to summary
public MutableAnnotationTypeDeclaration findAnnotationType(String qualifiedName)
Parameters
qualifiedName:String

the qualified name of the type to look up. Nested class delimiter is expected to be the '.' (dot).

Returns:MutableAnnotationTypeDeclaration

the MutableAnnotationTypeDeclaration with given qualified name, or null if no such class declaration is contained in the currently processed CompilationUnit

findClassback to summary
public MutableClassDeclaration findClass(String qualifiedName)
Parameters
qualifiedName:String

the qualified name of the type to look up. Nested class delimiter is expected to be the '.' (dot).

Returns:MutableClassDeclaration

the MutableClassDeclaration with given qualified name, or null if no such class declaration is contained in the currently processed CompilationUnit

findEnumerationTypeback to summary
public MutableEnumerationTypeDeclaration findEnumerationType(String qualifiedName)
Parameters
qualifiedName:String

the qualified name of the type to look up. Nested class delimiter is expected to be the '.' (dot).

Returns:MutableEnumerationTypeDeclaration

the MutableEnumerationTypeDeclaration with given qualified name, or null if no such class declaration is contained in the currently processed CompilationUnit

findInterfaceback to summary
public MutableInterfaceDeclaration findInterface(String qualifiedName)
Parameters
qualifiedName:String

the qualified name of the type to look up. Nested class delimiter is expected to be the '.' (dot).

Returns:MutableInterfaceDeclaration

the MutableInterfaceDeclaration with given qualified name, or null if no such interface declaration is contained in the currently processed CompilationUnit