Uses of Class
com.github.javaparser.ast.type.Type
Packages that use Type
Package
Description
-
Uses of Type in com.github.javaparser
Fields in com.github.javaparser with type parameters of type TypeMethods in com.github.javaparser that return TypeModifier and TypeMethodDescriptionfinal Type
GeneratedJavaParser.AnnotatedType()
(package private) Type
GeneratedJavaParserBase.juggleArrayType
(Type partialType, List<ArrayType.ArrayBracketPair> additionalBrackets) Throws together a Type, taking care of all the array bracketsstatic Type
Parses a Java type name and returns aType
that represents it.final Type
GeneratedJavaParser.ResultType
(NodeList<AnnotationExpr> annotations) https://docs.oracle.com/javase/specs/jls/se15/html/jls-8.html#jls-8.4.5final Type
GeneratedJavaParser.ResultTypeParseStart()
final Type
GeneratedJavaParser.Type
(NodeList<AnnotationExpr> annotations) https://docs.oracle.com/javase/specs/jls/se15/html/jls-4.html#jls-4.1final Type
GeneratedJavaParser.TypeArgument()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-4.html#jls-4.5.1Methods in com.github.javaparser that return types with arguments of type TypeModifier and TypeMethodDescriptionParses a Java type name and returns aType
that represents it.final RangedList
<Type> GeneratedJavaParser.TypeArguments()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-4.html#jls-4.5.1Methods in com.github.javaparser with parameters of type TypeModifier and TypeMethodDescriptionfinal ArrayCreationExpr
GeneratedJavaParser.ArrayCreation
(JavaToken begin, Type type) https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.10(package private) ArrayCreationExpr
GeneratedJavaParserBase.juggleArrayCreation
(TokenRange range, List<TokenRange> levelRanges, Type type, NodeList<Expression> dimensions, List<NodeList<AnnotationExpr>> arrayAnnotations, ArrayInitializerExpr arrayInitializerExpr) Throws together an ArrayCreationExpr from a lot of pieces(package private) Type
GeneratedJavaParserBase.juggleArrayType
(Type partialType, List<ArrayType.ArrayBracketPair> additionalBrackets) Throws together a Type, taking care of all the array bracketsfinal VariableDeclarator
GeneratedJavaParser.VariableDeclarator
(Type partialType) https://docs.oracle.com/javase/specs/jls/se15/html/jls-8.html#jls-8.3 -
Uses of Type in com.github.javaparser.ast.body
Fields in com.github.javaparser.ast.body declared as TypeModifier and TypeFieldDescriptionprivate Type
AnnotationMemberDeclaration.type
private Type
MethodDeclaration.type
private Type
Parameter.type
private Type
ReceiverParameter.type
private Type
VariableDeclarator.type
Fields in com.github.javaparser.ast.body with type parameters of type TypeMethods in com.github.javaparser.ast.body that return TypeModifier and TypeMethodDescriptionAnnotationMemberDeclaration.getType()
MethodDeclaration.getType()
Parameter.getType()
ReceiverParameter.getType()
VariableDeclarator.getType()
private Type
CallableDeclaration.getTypeWithVarargsAsArray
(Parameter p) private Type
CallableDeclaration.stripAnnotations
(Type type) private Type
CallableDeclaration.stripGenerics
(Type type) Methods in com.github.javaparser.ast.body that return types with arguments of type TypeMethods in com.github.javaparser.ast.body with parameters of type TypeModifier and TypeMethodDescriptionAnnotationDeclaration.addField
(Type type, String name, Modifier.Keyword... modifiers) private Type
CallableDeclaration.stripAnnotations
(Type type) private Type
CallableDeclaration.stripGenerics
(Type type) Constructors in com.github.javaparser.ast.body with parameters of type TypeModifierConstructorDescriptionAnnotationMemberDeclaration
(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) 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.Constructor parameters in com.github.javaparser.ast.body with type arguments of type Type -
Uses of Type in com.github.javaparser.ast.expr
Fields in com.github.javaparser.ast.expr declared as TypeModifier and TypeFieldDescriptionprivate Type
ArrayCreationExpr.elementType
private Type
CastExpr.type
private Type
ClassExpr.type
private Type
TypeExpr.type
Fields in com.github.javaparser.ast.expr with type parameters of type TypeModifier and TypeFieldDescriptionFieldAccessExpr.typeArguments
MethodCallExpr.typeArguments
MethodReferenceExpr.typeArguments
ObjectCreationExpr.typeArguments
Methods in com.github.javaparser.ast.expr that return TypeModifier and TypeMethodDescriptionArrayCreationExpr.createdType()
Takes the element type and wraps it in an ArrayType for every array creation level.ArrayCreationExpr.getElementType()
CastExpr.getType()
ClassExpr.getType()
TypeExpr.getType()
Methods in com.github.javaparser.ast.expr that return types with arguments of type TypeModifier and TypeMethodDescriptionFieldAccessExpr.getTypeArguments()
MethodCallExpr.getTypeArguments()
MethodReferenceExpr.getTypeArguments()
ObjectCreationExpr.getTypeArguments()
Methods in com.github.javaparser.ast.expr with parameters of type TypeMethod parameters in com.github.javaparser.ast.expr with type arguments of type TypeModifier and TypeMethodDescriptionFieldAccessExpr.setTypeArguments
(NodeList<Type> typeArguments) Sets the type argumentsMethodCallExpr.setTypeArguments
(NodeList<Type> typeArguments) Sets the typeArgumentsMethodReferenceExpr.setTypeArguments
(NodeList<Type> typeArguments) Sets the typeArgumentsObjectCreationExpr.setTypeArguments
(NodeList<Type> typeArguments) Sets the typeArgumentsConstructors in com.github.javaparser.ast.expr with parameters of type TypeModifierConstructorDescriptionArrayCreationExpr
(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
(TokenRange tokenRange, Type type) This constructor is used by the parser and is considered private.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 TypeModifierConstructorDescriptionFieldAccessExpr
(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 TypeModifier and TypeInterfaceDescriptioninterface
NodeWithType<N extends Node,
T extends Type> A node with a type.Methods in com.github.javaparser.ast.nodeTypes that return TypeModifier and TypeMethodDescriptiondefault 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 TypeModifier and TypeMethodDescriptionNodeWithVariables.calculateMaximumCommonType
(List<Type> types) NodeWithVariables.getMaximumCommonType()
Returns the type that maximum shared type between all variables.NodeWithTypeArguments.getTypeArguments()
Methods in com.github.javaparser.ast.nodeTypes with parameters of type TypeModifier and TypeMethodDescriptiondefault 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
NodeWithVariables.setAllTypes
(Type newType) Sets the type of all variables.default N
NodeWithTypeArguments.setTypeArguments
(Type... typeArguments) Method parameters in com.github.javaparser.ast.nodeTypes with type arguments of type TypeModifier and TypeMethodDescriptionNodeWithVariables.calculateMaximumCommonType
(List<Type> types) NodeWithTypeArguments.setTypeArguments
(NodeList<Type> typeArguments) Allows you to set the generic arguments -
Uses of Type in com.github.javaparser.ast.stmt
Fields in com.github.javaparser.ast.stmt with type parameters of type TypeMethods in com.github.javaparser.ast.stmt that return types with arguments of type TypeMethod parameters in com.github.javaparser.ast.stmt with type arguments of type TypeModifier and TypeMethodDescriptionExplicitConstructorInvocationStmt.setTypeArguments
(NodeList<Type> typeArguments) Sets the typeArgumentsConstructor parameters in com.github.javaparser.ast.stmt with type arguments of type TypeModifierConstructorDescriptionExplicitConstructorInvocationStmt
(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.typeModifier and TypeClassDescriptionclass
To indicate that a type is an array, it gets wrapped in an ArrayType for every array level it has.class
A class or an interface type.class
Represents a set of types.class
A primitive type.class
Base class for reference types.class
A type parameter.class
The union typeclass
An unknown parameter type object.class
A type called "var" waiting for Java to infer it.class
The return type of aMethodDeclaration
when it returns void.class
A wildcard type argument.Fields in com.github.javaparser.ast.type declared as TypeFields in com.github.javaparser.ast.type with type parameters of type TypeMethods in com.github.javaparser.ast.type that return TypeModifier and TypeMethodDescriptionType.clone()
ArrayType.getComponentType()
ArrayType.getElementType()
Finds the element type, meaning: the type without ArrayTypes around it.Type.getElementType()
Finds the element type, meaning: the type without ArrayTypes around it.Type.setAnnotations
(NodeList<AnnotationExpr> annotations) static Type
ArrayType.wrapInArrayTypes
(Type type, List<ArrayType.ArrayBracketPair>... arrayBracketPairLists) Takes lists of arrayBracketPairs, assumes the lists are ordered outer to inner and the pairs are ordered left to right.Methods in com.github.javaparser.ast.type that return types with arguments of type TypeModifier and TypeMethodDescriptionClassOrInterfaceType.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 TypeModifier and TypeMethodDescriptionArrayType.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 outer to inner and the pairs are ordered left to right.Method parameters in com.github.javaparser.ast.type with type arguments of type TypeModifier and TypeMethodDescriptionClassOrInterfaceType.setTypeArguments
(NodeList<Type> typeArguments) Sets the typeArgumentsConstructors in com.github.javaparser.ast.type with parameters of type TypeModifierConstructorDescriptionArrayType
(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 TypeModifierConstructorDescriptionClassOrInterfaceType
(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 TypeModifier and TypeMethodDescription<T> T
SymbolResolver.toResolvedType
(Type javaparserType, Class<T> resultClass) For types it would find the corresponding resolved types.