AnnotationMemberDeclaration
, CastExpr
, ClassExpr
, InstanceOfExpr
, MethodDeclaration
, ModuleProvidesStmt
, ModuleUsesStmt
, ObjectCreationExpr
, Parameter
, TypeExpr
, VariableDeclarator
public interface NodeWithType<N extends Node,T extends Type>
The main reason for this interface is to permit users to manipulate homogeneously all nodes with getType/setType methods
Modifier and Type | Method | Description |
---|---|---|
T |
getType() |
Gets the type
|
default N |
setType(Class<?> typeClass) |
Sets this type to this class and try to import it to the
CompilationUnit if needed |
default N |
setType(String typeString) |
|
N |
setType(T type) |
Sets the type
|
void |
tryAddImportToParentCompilationUnit(Class<?> clazz) |
T getType()
void tryAddImportToParentCompilationUnit(Class<?> clazz)
default N setType(Class<?> typeClass)
CompilationUnit
if neededtypeClass
- the typeCopyright © 2007–2019. All rights reserved.