| Package | Description |
|---|---|
| com.github.javaparser.ast.body | |
| com.github.javaparser.ast.expr | |
| com.github.javaparser.ast.nodeTypes | |
| com.github.javaparser.ast.stmt | |
| com.github.javaparser.ast.type |
| Modifier and Type | Method and Description |
|---|---|
Type<?> |
VariableDeclarator.getType() |
Type<?> |
Parameter.getType() |
Type<?> |
AnnotationMemberDeclaration.getType() |
Type<?> |
MethodDeclaration.getType() |
| Modifier and Type | Method and Description |
|---|---|
VariableDeclarator |
VariableDeclarator.setType(Type<?> type) |
Parameter |
Parameter.setType(Type<?> type) |
AnnotationMemberDeclaration |
AnnotationMemberDeclaration.setType(Type<?> type) |
MethodDeclaration |
MethodDeclaration.setType(Type<?> type) |
| Modifier and Type | Method and Description |
|---|---|
Type<?> |
ArrayCreationExpr.createdType()
Takes the element type and wraps it in an ArrayType for every array creation level.
|
Type<?> |
ArrayCreationExpr.getElementType() |
Type<?> |
TypeExpr.getType() |
Type<?> |
ClassExpr.getType() |
Type<?> |
CastExpr.getType() |
| Modifier and Type | Method and Description |
|---|---|
Optional<NodeList<Type<?>>> |
MethodCallExpr.getTypeArguments() |
Optional<NodeList<Type<?>>> |
MethodReferenceExpr.getTypeArguments() |
Optional<NodeList<Type<?>>> |
ObjectCreationExpr.getTypeArguments() |
Optional<NodeList<Type<?>>> |
FieldAccessExpr.getTypeArguments() |
| Modifier and Type | Method and Description |
|---|---|
ArrayCreationExpr |
ArrayCreationExpr.setElementType(Type<?> elementType) |
TypeExpr |
TypeExpr.setType(Type<?> type) |
ClassExpr |
ClassExpr.setType(Type<?> type) |
CastExpr |
CastExpr.setType(Type<?> type) |
| Modifier and Type | Method and Description |
|---|---|
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
|
FieldAccessExpr |
FieldAccessExpr.setTypeArguments(NodeList<Type<?>> types)
Sets the type arguments
|
| Constructor and Description |
|---|
ArrayCreationExpr(Range range,
Type<?> elementType) |
ArrayCreationExpr(Range range,
Type<?> elementType,
NodeList<ArrayCreationLevel> levels,
ArrayInitializerExpr initializer) |
ArrayCreationExpr(Type<?> elementType) |
ArrayCreationExpr(Type<?> elementType,
NodeList<ArrayCreationLevel> levels,
ArrayInitializerExpr initializer) |
CastExpr(Range range,
Type<?> type,
Expression expression) |
CastExpr(Type<?> type,
Expression expression) |
ClassExpr(Range range,
Type type) |
ClassExpr(Type<?> type) |
TypeExpr(Range range,
Type<?> type) |
VariableDeclarationExpr(Type<?> type,
String variableName) |
VariableDeclarationExpr(Type<?> type,
String variableName,
Modifier... modifiers) |
| Constructor and Description |
|---|
FieldAccessExpr(Range range,
Expression scope,
NodeList<Type<?>> typeArguments,
SimpleName field) |
MethodCallExpr(Range range,
Expression scope,
NodeList<Type<?>> typeArguments,
SimpleName name,
NodeList<Expression> arguments) |
MethodReferenceExpr(Range range,
Expression scope,
NodeList<Type<?>> typeArguments,
String identifier) |
ObjectCreationExpr(Range range,
Expression scope,
ClassOrInterfaceType type,
NodeList<Type<?>> typeArguments,
NodeList<Expression> arguments,
NodeList<BodyDeclaration<?>> anonymousBody) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
NodeWithType<N extends Node,T extends Type<?>>
A node having a type.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<NodeList<Type<?>>> |
NodeWithTypeArguments.getTypeArguments() |
| Modifier and Type | Method and 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 and Description |
|---|---|
N |
NodeWithTypeArguments.setTypeArguments(NodeList<Type<?>> typeArguments)
Allows you to set the generic arguments
|
| Modifier and Type | Method and Description |
|---|---|
Optional<NodeList<Type<?>>> |
ExplicitConstructorInvocationStmt.getTypeArguments() |
| Modifier and Type | Method and Description |
|---|---|
ExplicitConstructorInvocationStmt |
ExplicitConstructorInvocationStmt.setTypeArguments(NodeList<Type<?>> typeArguments)
Sets the typeArguments
|
| Constructor and Description |
|---|
ExplicitConstructorInvocationStmt(Range range,
NodeList<Type<?>> typeArguments,
boolean isThis,
Expression expression,
NodeList<Expression> arguments) |
| Modifier and Type | Class and Description |
|---|---|
class |
Type<T extends Type> |
| Modifier and Type | Class and 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 |
class |
IntersectionType
Represents a set of types.
|
class |
PrimitiveType |
class |
ReferenceType<T extends ReferenceType> |
class |
TypeParameter
This class represents the declaration of a generics argument.
|
class |
UnionType
Represents a set of types.
|
class |
UnknownType
An unknown parameter type object.
|
class |
VoidType |
class |
WildcardType |
| Modifier and Type | Method and Description |
|---|---|
Type |
ArrayType.getComponentType() |
Type<?> |
Type.getElementType()
Finds the element type, meaning: the type without ArrayTypes around it.
|
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 and 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 and Description |
|---|---|
ArrayType |
ArrayType.setComponentType(Type<?> type) |
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 and Description |
|---|---|
ClassOrInterfaceType |
ClassOrInterfaceType.setTypeArguments(NodeList<Type<?>> typeArguments)
Sets the typeArguments
|
| Constructor and Description |
|---|
ArrayType(Range range,
Type<?> componentType,
NodeList<AnnotationExpr> annotations) |
ArrayType(Type<?> type,
AnnotationExpr... annotations) |
ArrayType(Type<?> componentType,
NodeList<AnnotationExpr> annotations) |
| Constructor and Description |
|---|
ClassOrInterfaceType(Range range,
ClassOrInterfaceType scope,
SimpleName name,
NodeList<Type<?>> typeArguments) |
Copyright © 2007–2016. All rights reserved.