Uses of Class
com.github.javaparser.ast.type.Type
-
-
Uses of Type in com.github.javaparser
Fields in com.github.javaparser with type parameters of type Type Modifier and Type Field Description static ParseStart<Type>
ParseStart. TYPE
Methods in com.github.javaparser that return Type Modifier and Type Method Description static Type
StaticJavaParser. parseType(String type)
Parses a Java type name and returns aType
that represents it.Methods in com.github.javaparser that return types with arguments of type Type Modifier and Type Method Description ParseResult<Type>
JavaParser. parseType(String type)
Parses a Java type name and returns aType
that represents it. -
Uses of Type in com.github.javaparser.ast.body
Methods in com.github.javaparser.ast.body that return Type Modifier and Type Method Description Type
AnnotationMemberDeclaration. getType()
Type
MethodDeclaration. getType()
Type
Parameter. getType()
Type
ReceiverParameter. getType()
Type
VariableDeclarator. getType()
Methods in com.github.javaparser.ast.body that return types with arguments of type Type Modifier and Type Method Description List<Type>
CallableDeclaration.Signature. getParameterTypes()
Methods in com.github.javaparser.ast.body with parameters of type Type Modifier and Type Method Description AnnotationMemberDeclaration
AnnotationMemberDeclaration. setType(Type type)
MethodDeclaration
MethodDeclaration. setType(Type type)
Parameter
Parameter. setType(Type type)
ReceiverParameter
ReceiverParameter. setType(Type type)
VariableDeclarator
VariableDeclarator. setType(Type type)
Constructors in com.github.javaparser.ast.body with parameters of type Type Constructor Description AnnotationMemberDeclaration(NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, SimpleName name, Expression defaultValue)
AnnotationMemberDeclaration(NodeList<Modifier> modifiers, Type type, String name, Expression defaultValue)
AnnotationMemberDeclaration(TokenRange tokenRange, NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, SimpleName name, Expression defaultValue)
This constructor is used by the parser and is considered private.FieldDeclaration(NodeList<Modifier> modifiers, Type type, String name)
Creates aFieldDeclaration
.MethodDeclaration(NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<TypeParameter> typeParameters, Type type, SimpleName name, NodeList<Parameter> parameters, NodeList<ReferenceType> thrownExceptions, BlockStmt body)
MethodDeclaration(NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<TypeParameter> typeParameters, Type type, SimpleName name, NodeList<Parameter> parameters, NodeList<ReferenceType> thrownExceptions, BlockStmt body, ReceiverParameter receiverParameter)
MethodDeclaration(NodeList<Modifier> modifiers, Type type, String name)
MethodDeclaration(NodeList<Modifier> modifiers, String name, Type type, NodeList<Parameter> parameters)
MethodDeclaration(TokenRange tokenRange, NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<TypeParameter> typeParameters, Type type, SimpleName name, NodeList<Parameter> parameters, NodeList<ReferenceType> thrownExceptions, BlockStmt body, ReceiverParameter receiverParameter)
This constructor is used by the parser and is considered private.Parameter(NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, boolean isVarArgs, NodeList<AnnotationExpr> varArgsAnnotations, SimpleName name)
Parameter(NodeList<Modifier> modifiers, Type type, SimpleName name)
Parameter(Type type, SimpleName name)
Parameter(Type type, String name)
Creates a newParameter
.Parameter(TokenRange tokenRange, NodeList<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.ReceiverParameter(NodeList<AnnotationExpr> annotations, Type type, Name name)
ReceiverParameter(Type type, Name name)
ReceiverParameter(Type type, String name)
Creates a newReceiverParameter
.ReceiverParameter(TokenRange tokenRange, NodeList<AnnotationExpr> annotations, Type type, Name name)
This constructor is used by the parser and is considered private.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. -
Uses of Type in com.github.javaparser.ast.expr
Methods in com.github.javaparser.ast.expr that return Type 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()
Methods in com.github.javaparser.ast.expr that return types with arguments of type Type 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()
Methods in com.github.javaparser.ast.expr with parameters of type Type 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)
Method parameters in com.github.javaparser.ast.expr with type arguments of type Type Modifier and Type Method Description FieldAccessExpr
FieldAccessExpr. setTypeArguments(NodeList<Type> typeArguments)
Sets the type argumentsMethodCallExpr
MethodCallExpr. setTypeArguments(NodeList<Type> typeArguments)
Sets the typeArgumentsMethodReferenceExpr
MethodReferenceExpr. setTypeArguments(NodeList<Type> typeArguments)
Sets the typeArgumentsObjectCreationExpr
ObjectCreationExpr. setTypeArguments(NodeList<Type> typeArguments)
Sets the typeArgumentsConstructors in com.github.javaparser.ast.expr with parameters of type Type Constructor Description ArrayCreationExpr(Type elementType)
ArrayCreationExpr(Type elementType, NodeList<ArrayCreationLevel> levels, ArrayInitializerExpr initializer)
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 parameters in com.github.javaparser.ast.expr with type arguments of type Type 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(Expression scope, NodeList<Type> typeArguments, String 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. -
Uses of Type in com.github.javaparser.ast.nodeTypes
Classes in com.github.javaparser.ast.nodeTypes with type parameters of type Type Modifier and Type Interface Description interface
NodeWithType<N extends Node,T extends Type>
A node with a type.Methods in com.github.javaparser.ast.nodeTypes that return Type Modifier and Type Method Description default Type
NodeWithVariables. getCommonType()
Returns the type that is shared between all variables.default Type
NodeWithVariables. getElementType()
Returns the element type.Methods in com.github.javaparser.ast.nodeTypes that return types with arguments of type Type Modifier and Type Method Description static Optional<Type>
NodeWithVariables. calculateMaximumCommonType(List<Type> types)
default Optional<Type>
NodeWithVariables. getMaximumCommonType()
Returns the type that maximum shared type between all variables.Optional<NodeList<Type>>
NodeWithTypeArguments. getTypeArguments()
Methods in com.github.javaparser.ast.nodeTypes with parameters of type Type Modifier and Type Method Description default Parameter
NodeWithParameters. addAndGetParameter(Type type, String name)
default FieldDeclaration
NodeWithMembers. addField(Type type, String name, Modifier.Keyword... modifiers)
Add a field to this.default FieldDeclaration
NodeWithMembers. addFieldWithInitializer(Type type, String name, Expression initializer, Modifier.Keyword... modifiers)
Add a field to this.default N
NodeWithParameters. addParameter(Type type, String name)
default FieldDeclaration
NodeWithMembers. addPrivateField(Type type, String name)
Add a private field to this.default FieldDeclaration
NodeWithMembers. addProtectedField(Type type, String name)
Add a protected field to this.default FieldDeclaration
NodeWithMembers. addPublicField(Type type, String name)
Add a public field to this.default N
NodeWithTypeArguments. setTypeArguments(Type... typeArguments)
Method parameters in com.github.javaparser.ast.nodeTypes with type arguments of type Type Modifier and Type Method Description static Optional<Type>
NodeWithVariables. calculateMaximumCommonType(List<Type> types)
N
NodeWithTypeArguments. setTypeArguments(NodeList<Type> typeArguments)
Allows you to set the generic arguments -
Uses of Type in com.github.javaparser.ast.stmt
Methods in com.github.javaparser.ast.stmt that return types with arguments of type Type Modifier and Type Method Description Optional<NodeList<Type>>
ExplicitConstructorInvocationStmt. getTypeArguments()
Method parameters in com.github.javaparser.ast.stmt with type arguments of type Type Modifier and Type Method Description ExplicitConstructorInvocationStmt
ExplicitConstructorInvocationStmt. setTypeArguments(NodeList<Type> typeArguments)
Sets the typeArgumentsConstructor parameters in com.github.javaparser.ast.stmt with type arguments of type Type 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. -
Uses of Type in com.github.javaparser.ast.type
Subclasses of Type in com.github.javaparser.ast.type 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
The union typeclass
UnknownType
An unknown parameter type object.class
VarType
A type called "var" waiting for Java to infer it.class
VoidType
The return type of aMethodDeclaration
when it returns void.class
WildcardType
A wildcard type argument.Methods in com.github.javaparser.ast.type that return Type 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.Methods in com.github.javaparser.ast.type that return types with arguments of type Type 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.Methods in com.github.javaparser.ast.type with parameters of type Type 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.Method parameters in com.github.javaparser.ast.type with type arguments of type Type Modifier and Type Method Description ClassOrInterfaceType
ClassOrInterfaceType. setTypeArguments(NodeList<Type> typeArguments)
Sets the typeArgumentsConstructors in com.github.javaparser.ast.type with parameters of type Type Constructor Description ArrayType(Type type, AnnotationExpr... annotations)
ArrayType(Type componentType, ArrayType.Origin origin, NodeList<AnnotationExpr> annotations)
ArrayType(TokenRange tokenRange, Type componentType, ArrayType.Origin origin, NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.Constructor parameters in com.github.javaparser.ast.type with type arguments of type Type 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. -
Uses of Type in com.github.javaparser.resolution
Methods in com.github.javaparser.resolution with parameters of type Type Modifier and Type Method Description <T> T
SymbolResolver. toResolvedType(Type javaparserType, Class<T> resultClass)
For types it would find the corresponding resolved types.
-