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 |
Parameter.getElementType() |
Type |
FieldDeclaration.getElementType() |
Type |
MethodDeclaration.getElementType() |
Type |
VariableDeclarator.getType() |
Type<?> |
Parameter.getType() |
Type<?> |
AnnotationMemberDeclaration.getType() |
Type |
MethodDeclaration.getType() |
Modifier and Type | Method and Description |
---|---|
static FieldDeclaration |
FieldDeclaration.create(EnumSet<Modifier> modifiers,
Type<?> type,
String name)
Creates a
FieldDeclaration . |
static FieldDeclaration |
FieldDeclaration.create(EnumSet<Modifier> modifiers,
Type<?> type,
VariableDeclarator variable)
Creates a
FieldDeclaration . |
static Parameter |
Parameter.create(Type elementType,
String name)
Creates a new
Parameter . |
FieldDeclaration |
FieldDeclaration.setElementType(Type elementType) |
MethodDeclaration |
MethodDeclaration.setElementType(Type elementType) |
Parameter |
Parameter.setElementType(Type<?> elementType) |
VariableDeclarator |
VariableDeclarator.setType(Type type) |
Parameter |
Parameter.setType(Type type) |
MethodDeclaration |
MethodDeclaration.setType(Type type) |
AnnotationMemberDeclaration |
AnnotationMemberDeclaration.setType(Type<?> type) |
Modifier and Type | Method and Description |
---|---|
Type<?> |
ArrayCreationExpr.getElementType() |
Type |
VariableDeclarationExpr.getElementType() |
Type<?> |
ArrayCreationExpr.getType()
Takes the element type and wraps it in an ArrayType for every array creation level.
|
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 |
---|---|
static VariableDeclarationExpr |
VariableDeclarationExpr.create(Type type,
String name)
Creates a
VariableDeclarationExpr . |
VariableDeclarationExpr |
VariableDeclarationExpr.setElementType(Type elementType) |
ArrayCreationExpr |
ArrayCreationExpr.setElementType(Type<?> elementType) |
ClassExpr |
ClassExpr.setType(Type type) |
TypeExpr |
TypeExpr.setType(Type<?> type) |
CastExpr |
CastExpr.setType(Type<?> type) |
Modifier and Type | Method and Description |
---|---|
MethodCallExpr |
MethodCallExpr.setTypeArguments(Optional<NodeList<Type<?>>> types) |
MethodReferenceExpr |
MethodReferenceExpr.setTypeArguments(Optional<NodeList<Type<?>>> types) |
ObjectCreationExpr |
ObjectCreationExpr.setTypeArguments(Optional<NodeList<Type<?>>> typeArguments) |
FieldAccessExpr |
FieldAccessExpr.setTypeArguments(Optional<NodeList<Type<?>>> types) |
Constructor and Description |
---|
FieldAccessExpr(Range range,
Expression scope,
Optional<NodeList<Type<?>>> typeArguments,
NameExpr field) |
MethodCallExpr(Range range,
Optional<Expression> scope,
Optional<NodeList<Type<?>>> typeArguments,
NameExpr name,
NodeList<Expression> args) |
MethodReferenceExpr(Range range,
Expression scope,
Optional<NodeList<Type<?>>> typeArguments,
String identifier) |
ObjectCreationExpr(Range range,
Optional<Expression> scope,
ClassOrInterfaceType type,
Optional<NodeList<Type<?>>> typeArguments,
NodeList<Expression> args,
Optional<NodeList<BodyDeclaration<?>>> anonymousBody) |
Modifier and Type | Interface and Description |
---|---|
interface |
NodeWithType<N,T extends Type<?>>
A node having a type.
|
Modifier and Type | Method and Description |
---|---|
Type<?> |
NodeWithElementType.getElementType() |
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 T |
NodeWithParameters.addParameter(Type type,
String name) |
T |
NodeWithElementType.setElementType(Type<?> elementType) |
default T |
NodeWithTypeArguments.setTypeArguments(Type<?>... typeArguments) |
Modifier and Type | Method and Description |
---|---|
T |
NodeWithTypeArguments.setTypeArguments(Optional<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(Optional<NodeList<Type<?>>> types) |
Constructor and Description |
---|
ExplicitConstructorInvocationStmt(Range range,
Optional<NodeList<Type<?>>> typeArguments,
boolean isThis,
Optional<Expression> expr,
NodeList<Expression> args) |
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() |
static Type |
ArrayType.wrapInArrayTypes(Type type,
NodeList<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,NodeList<ArrayBracketPair>> |
ArrayType.unwrapArrayTypes(Type type)
Takes a type that may be an ArrayType.
|
Modifier and Type | Method and Description |
---|---|
static ArrayType |
ArrayType.arrayOf(Type type,
AnnotationExpr... annotations) |
ArrayType |
ArrayType.setComponentType(Type type) |
static Pair<Type,NodeList<ArrayBracketPair>> |
ArrayType.unwrapArrayTypes(Type type)
Takes a type that may be an ArrayType.
|
static Type |
ArrayType.wrapInArrayTypes(Type type,
NodeList<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(Optional<NodeList<Type<?>>> types) |
Constructor and Description |
---|
ArrayType(Range range,
Type componentType,
NodeList<AnnotationExpr> annotations) |
ArrayType(Type componentType,
NodeList<AnnotationExpr> annotations) |
Constructor and Description |
---|
ClassOrInterfaceType(Range range,
Optional<ClassOrInterfaceType> scope,
String name,
Optional<NodeList<Type<?>>> typeArguments) |
Copyright © 2007–2016. All rights reserved.