- All Known Implementing Classes:
AnnotationMemberDeclaration,CastExpr,ClassExpr,InstanceOfExpr,MethodDeclaration,ObjectCreationExpr,Parameter,PatternExpr,ReceiverParameter,TypeExpr,VariableDeclarator
A node with a type.
The main reason for this interface is to permit users to manipulate homogeneously all nodes with getType/setType methods
- Since:
- 2.3.1
-
Method Summary
Modifier and TypeMethodDescriptiongetType()Gets the typedefault Stringdefault NSets this type to this class and try to import it to theCompilationUnitif neededdefault NSets the typevoidtryAddImportToParentCompilationUnit(Class<?> clazz)
-
Method Details
-
getType
T getType()Gets the type- Returns:
- the type
-
setType
Sets the type- Parameters:
type- the type- Returns:
- this
-
tryAddImportToParentCompilationUnit
-
setType
Sets this type to this class and try to import it to theCompilationUnitif needed- Parameters:
typeClass- the type- Returns:
- this
-
setType
-
getTypeAsString
-