Modifier and Type | Field | Description |
---|---|---|
static ParseStart<Type> |
ParseStart.TYPE |
Modifier and Type | Method | Description |
---|---|---|
static Type |
JavaParser.parseType(String type) |
Parses a Java type name and returns a
Type that represents it. |
Modifier and Type | Method | Description |
---|---|---|
Type |
AnnotationMemberDeclaration.getType() |
|
Type |
MethodDeclaration.getType() |
|
Type |
Parameter.getType() |
|
Type |
VariableDeclarator.getType() |
Modifier and Type | Method | Description |
---|---|---|
List<Type> |
CallableDeclaration.Signature.getParameterTypes() |
Modifier and Type | Method | Description |
---|---|---|
AnnotationMemberDeclaration |
AnnotationMemberDeclaration.setType(Type type) |
|
MethodDeclaration |
MethodDeclaration.setType(Type type) |
|
Parameter |
Parameter.setType(Type type) |
|
VariableDeclarator |
VariableDeclarator.setType(Type type) |
Constructor | Description |
---|---|
AnnotationMemberDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
SimpleName name,
Expression defaultValue) |
This constructor is used by the parser and is considered private.
|
AnnotationMemberDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
SimpleName name,
Expression defaultValue) |
|
AnnotationMemberDeclaration(EnumSet<Modifier> modifiers,
Type type,
String name,
Expression defaultValue) |
|
FieldDeclaration(EnumSet<Modifier> modifiers,
Type type,
String name) |
Creates a
FieldDeclaration . |
MethodDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
Type type,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body) |
This constructor is used by the parser and is considered private.
|
MethodDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
Type type,
SimpleName name,
boolean isDefault,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body) |
Deprecated.
this constructor allows you to set "isDefault", but this is no longer a field of this node, but simply one of the modifiers. Use setDefault(boolean) or add DEFAULT to the modifiers set.
|
MethodDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
Type type,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body) |
|
MethodDeclaration(EnumSet<Modifier> modifiers,
Type type,
String name) |
|
MethodDeclaration(EnumSet<Modifier> modifiers,
String name,
Type type,
NodeList<Parameter> parameters) |
|
Parameter(Type type,
SimpleName name) |
|
Parameter(Type type,
String name) |
Creates a new
Parameter . |
Parameter(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
boolean isVarArgs,
NodeList<AnnotationExpr> varArgsAnnotations,
SimpleName name) |
This constructor is used by the parser and is considered private.
|
Parameter(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
boolean isVarArgs,
NodeList<AnnotationExpr> varArgsAnnotations,
SimpleName name) |
|
Parameter(EnumSet<Modifier> modifiers,
Type type,
SimpleName name) |
|
VariableDeclarator(Type type,
SimpleName name) |
|
VariableDeclarator(Type type,
SimpleName name,
Expression initializer) |
Defines the declaration of a variable.
|
VariableDeclarator(Type type,
String variableName) |
|
VariableDeclarator(Type type,
String variableName,
Expression initializer) |
|
VariableDeclarator(TokenRange tokenRange,
Type type,
SimpleName name,
Expression initializer) |
This constructor is used by the parser and is considered private.
|
Modifier and Type | Method | Description |
---|---|---|
Type |
ArrayCreationExpr.createdType() |
Takes the element type and wraps it in an ArrayType for every array creation level.
|
Type |
ArrayCreationExpr.getElementType() |
|
Type |
CastExpr.getType() |
|
Type |
ClassExpr.getType() |
|
Type |
TypeExpr.getType() |
Modifier and Type | Method | Description |
---|---|---|
Optional<NodeList<Type>> |
FieldAccessExpr.getTypeArguments() |
|
Optional<NodeList<Type>> |
MethodCallExpr.getTypeArguments() |
|
Optional<NodeList<Type>> |
MethodReferenceExpr.getTypeArguments() |
|
Optional<NodeList<Type>> |
ObjectCreationExpr.getTypeArguments() |
Modifier and Type | Method | Description |
---|---|---|
ArrayCreationExpr |
ArrayCreationExpr.setElementType(Type elementType) |
|
CastExpr |
CastExpr.setType(Type type) |
|
ClassExpr |
ClassExpr.setType(Type type) |
|
TypeExpr |
TypeExpr.setType(Type type) |
Modifier and Type | Method | Description |
---|---|---|
FieldAccessExpr |
FieldAccessExpr.setTypeArguments(NodeList<Type> typeArguments) |
Sets the type arguments
|
MethodCallExpr |
MethodCallExpr.setTypeArguments(NodeList<Type> typeArguments) |
Sets the typeArguments
|
MethodReferenceExpr |
MethodReferenceExpr.setTypeArguments(NodeList<Type> typeArguments) |
Sets the typeArguments
|
ObjectCreationExpr |
ObjectCreationExpr.setTypeArguments(NodeList<Type> typeArguments) |
Sets the typeArguments
|
Constructor | Description |
---|---|
ArrayCreationExpr(Type elementType) |
|
ArrayCreationExpr(Type elementType,
NodeList<ArrayCreationLevel> levels,
ArrayInitializerExpr initializer) |
|
ArrayCreationExpr(Range range,
Type elementType) |
Deprecated.
range shouldn't be in utility constructors.
|
ArrayCreationExpr(TokenRange tokenRange,
Type elementType,
NodeList<ArrayCreationLevel> levels,
ArrayInitializerExpr initializer) |
This constructor is used by the parser and is considered private.
|
CastExpr(Type type,
Expression expression) |
|
CastExpr(TokenRange tokenRange,
Type type,
Expression expression) |
This constructor is used by the parser and is considered private.
|
ClassExpr(Type type) |
|
ClassExpr(TokenRange tokenRange,
Type type) |
This constructor is used by the parser and is considered private.
|
TypeExpr(Type type) |
|
TypeExpr(TokenRange tokenRange,
Type type) |
This constructor is used by the parser and is considered private.
|
VariableDeclarationExpr(Type type,
String variableName) |
|
VariableDeclarationExpr(Type type,
String variableName,
Modifier... modifiers) |
Constructor | Description |
---|---|
FieldAccessExpr(Expression scope,
NodeList<Type> typeArguments,
SimpleName name) |
|
FieldAccessExpr(TokenRange tokenRange,
Expression scope,
NodeList<Type> typeArguments,
SimpleName name) |
This constructor is used by the parser and is considered private.
|
MethodCallExpr(Expression scope,
NodeList<Type> typeArguments,
SimpleName name,
NodeList<Expression> arguments) |
|
MethodCallExpr(TokenRange tokenRange,
Expression scope,
NodeList<Type> typeArguments,
SimpleName name,
NodeList<Expression> arguments) |
This constructor is used by the parser and is considered private.
|
MethodReferenceExpr(Expression scope,
NodeList<Type> typeArguments,
String identifier) |
|
MethodReferenceExpr(TokenRange tokenRange,
Expression scope,
NodeList<Type> typeArguments,
String identifier) |
This constructor is used by the parser and is considered private.
|
ObjectCreationExpr(Expression scope,
ClassOrInterfaceType type,
NodeList<Type> typeArguments,
NodeList<Expression> arguments,
NodeList<BodyDeclaration<?>> anonymousClassBody) |
|
ObjectCreationExpr(TokenRange tokenRange,
Expression scope,
ClassOrInterfaceType type,
NodeList<Type> typeArguments,
NodeList<Expression> arguments,
NodeList<BodyDeclaration<?>> anonymousClassBody) |
This constructor is used by the parser and is considered private.
|
Modifier and Type | Method | Description |
---|---|---|
Type |
ModuleProvidesStmt.getType() |
|
Type |
ModuleUsesStmt.getType() |
Modifier and Type | Method | Description |
---|---|---|
NodeList<Type> |
ModuleProvidesStmt.getWithTypes() |
Modifier and Type | Method | Description |
---|---|---|
ModuleProvidesStmt |
ModuleProvidesStmt.setType(Type type) |
|
ModuleUsesStmt |
ModuleUsesStmt.setType(Type type) |
Modifier and Type | Method | Description |
---|---|---|
ModuleProvidesStmt |
ModuleProvidesStmt.setWithTypes(NodeList<Type> withTypes) |
Constructor | Description |
---|---|
ModuleProvidesStmt(Type type,
NodeList<Type> withTypes) |
|
ModuleProvidesStmt(TokenRange tokenRange,
Type type,
NodeList<Type> withTypes) |
This constructor is used by the parser and is considered private.
|
ModuleUsesStmt(Type type) |
|
ModuleUsesStmt(TokenRange tokenRange,
Type type) |
This constructor is used by the parser and is considered private.
|
Constructor | Description |
---|---|
ModuleProvidesStmt(Type type,
NodeList<Type> withTypes) |
|
ModuleProvidesStmt(TokenRange tokenRange,
Type type,
NodeList<Type> withTypes) |
This constructor is used by the parser and is considered private.
|
Modifier and Type | Interface | Description |
---|---|---|
interface |
NodeWithType<N extends Node,T extends Type> |
A node with a type.
|
Modifier and Type | Method | Description |
---|---|---|
static Type |
NodeWithVariables.calculateMaximumCommonType(List<Type> types) |
|
default Type |
NodeWithVariables.getCommonType() |
Returns the type that is shared between all variables.
|
default Type |
NodeWithVariables.getElementType() |
Returns the element type.
|
default Type |
NodeWithVariables.getMaximumCommonType() |
Returns the type that maximum shared type between all variables.
|
Modifier and Type | Method | Description |
---|---|---|
Optional<NodeList<Type>> |
NodeWithTypeArguments.getTypeArguments() |
Modifier and Type | Method | Description |
---|---|---|
default Parameter |
NodeWithParameters.addAndGetParameter(Type type,
String name) |
|
default FieldDeclaration |
NodeWithMembers.addField(Type type,
String name,
Modifier... modifiers) |
Add a field to this
|
default N |
NodeWithParameters.addParameter(Type type,
String name) |
|
default N |
NodeWithTypeArguments.setTypeArguments(Type... typeArguments) |
Modifier and Type | Method | Description |
---|---|---|
static Type |
NodeWithVariables.calculateMaximumCommonType(List<Type> types) |
|
N |
NodeWithTypeArguments.setTypeArguments(NodeList<Type> typeArguments) |
Allows you to set the generic arguments
|
Modifier and Type | Method | Description |
---|---|---|
Optional<NodeList<Type>> |
ExplicitConstructorInvocationStmt.getTypeArguments() |
Modifier and Type | Method | Description |
---|---|---|
ExplicitConstructorInvocationStmt |
ExplicitConstructorInvocationStmt.setTypeArguments(NodeList<Type> typeArguments) |
Sets the typeArguments
|
Constructor | Description |
---|---|
ExplicitConstructorInvocationStmt(NodeList<Type> typeArguments,
boolean isThis,
Expression expression,
NodeList<Expression> arguments) |
|
ExplicitConstructorInvocationStmt(TokenRange tokenRange,
NodeList<Type> typeArguments,
boolean isThis,
Expression expression,
NodeList<Expression> arguments) |
This constructor is used by the parser and is considered private.
|
Modifier and Type | Class | Description |
---|---|---|
class |
ArrayType |
To indicate that a type is an array, it gets wrapped in an ArrayType for every array level it has.
|
class |
ClassOrInterfaceType |
A class or an interface type.
|
class |
IntersectionType |
Represents a set of types.
|
class |
PrimitiveType |
A primitive type.
|
class |
ReferenceType |
Base class for reference types.
|
class |
TypeParameter |
A type parameter.
|
class |
UnionType |
Represents a set of types.
|
class |
UnknownType |
An unknown parameter type object.
|
class |
VoidType |
The return type of a
MethodDeclaration
when it returns void. |
class |
WildcardType |
A wildcard type argument.
|
Modifier and Type | Method | Description |
---|---|---|
Type |
Type.clone() |
|
Type |
ArrayType.getComponentType() |
|
Type |
Type.getElementType() |
Finds the element type, meaning: the type without ArrayTypes around it.
|
Type |
Type.setAnnotations(NodeList<AnnotationExpr> annotations) |
|
static Type |
ArrayType.wrapInArrayTypes(Type type,
List<ArrayType.ArrayBracketPair>... arrayBracketPairLists) |
Takes lists of arrayBracketPairs, assumes the lists are ordered left to right and the pairs are ordered left to
right, mirroring the actual code.
|
Modifier and Type | Method | Description |
---|---|---|
Optional<NodeList<Type>> |
ClassOrInterfaceType.getTypeArguments() |
|
static Pair<Type,List<ArrayType.ArrayBracketPair>> |
ArrayType.unwrapArrayTypes(Type type) |
Takes a type that may be an ArrayType.
|
Modifier and Type | Method | Description |
---|---|---|
ArrayType |
ArrayType.setComponentType(Type componentType) |
|
static Pair<Type,List<ArrayType.ArrayBracketPair>> |
ArrayType.unwrapArrayTypes(Type type) |
Takes a type that may be an ArrayType.
|
static Type |
ArrayType.wrapInArrayTypes(Type type,
List<ArrayType.ArrayBracketPair>... arrayBracketPairLists) |
Takes lists of arrayBracketPairs, assumes the lists are ordered left to right and the pairs are ordered left to
right, mirroring the actual code.
|
Modifier and Type | Method | Description |
---|---|---|
ClassOrInterfaceType |
ClassOrInterfaceType.setTypeArguments(NodeList<Type> typeArguments) |
Sets the typeArguments
|
Constructor | Description |
---|---|
ArrayType(Type type,
AnnotationExpr... annotations) |
|
ArrayType(Type componentType,
NodeList<AnnotationExpr> annotations) |
|
ArrayType(TokenRange tokenRange,
Type componentType,
NodeList<AnnotationExpr> annotations) |
This constructor is used by the parser and is considered private.
|
Constructor | Description |
---|---|
ClassOrInterfaceType(ClassOrInterfaceType scope,
SimpleName name,
NodeList<Type> typeArguments) |
|
ClassOrInterfaceType(ClassOrInterfaceType scope,
SimpleName name,
NodeList<Type> typeArguments,
NodeList<AnnotationExpr> annotations) |
|
ClassOrInterfaceType(TokenRange tokenRange,
ClassOrInterfaceType scope,
SimpleName name,
NodeList<Type> typeArguments,
NodeList<AnnotationExpr> annotations) |
This constructor is used by the parser and is considered private.
|
Copyright © 2007–2019. All rights reserved.