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. TYPEMethods in com.github.javaparser that return Type Modifier and Type Method Description TypeJavaParserAdapter. parseType(String type)static TypeStaticJavaParser. parseType(String type)Parses a Java type name and returns aTypethat 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 aTypethat 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 TypeAnnotationMemberDeclaration. getType()TypeMethodDeclaration. getType()TypeParameter. getType()TypeReceiverParameter. getType()TypeVariableDeclarator. 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 FieldDeclarationAnnotationDeclaration. addField(Type type, String name, Modifier.Keyword... modifiers)AnnotationMemberDeclarationAnnotationMemberDeclaration. setType(Type type)MethodDeclarationMethodDeclaration. setType(Type type)ParameterParameter. setType(Type type)ReceiverParameterReceiverParameter. setType(Type type)VariableDeclaratorVariableDeclarator. 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 TypeArrayCreationExpr. createdType()Takes the element type and wraps it in an ArrayType for every array creation level.TypeArrayCreationExpr. getElementType()TypeCastExpr. getType()TypeClassExpr. getType()TypePatternExpr. getType()The types of record patters and top-level type patterns must be reference types, but nested type patterns can also have primitive types.TypeTypeExpr. 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 ArrayCreationExprArrayCreationExpr. setElementType(Type elementType)CastExprCastExpr. setType(Type type)ClassExprClassExpr. setType(Type type)PatternExprPatternExpr. setType(Type type)TypeExprTypeExpr. setType(Type type)Method parameters in com.github.javaparser.ast.expr with type arguments of type Type Modifier and Type Method Description FieldAccessExprFieldAccessExpr. setTypeArguments(NodeList<Type> typeArguments)Sets the type argumentsMethodCallExprMethodCallExpr. setTypeArguments(NodeList<Type> typeArguments)Sets the typeArgumentsMethodReferenceExprMethodReferenceExpr. setTypeArguments(NodeList<Type> typeArguments)Sets the typeArgumentsObjectCreationExprObjectCreationExpr. 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.PatternExpr(Type type)PatternExpr(TokenRange tokenRange, Type type)This constructor is used by the parser and is considered private.RecordPatternExpr(NodeList<Modifier> modifiers, Type type, NodeList<PatternExpr> patternList)RecordPatternExpr(TokenRange tokenRange, NodeList<Modifier> modifiers, Type type, NodeList<PatternExpr> patternList)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.TypePatternExpr(NodeList<Modifier> modifiers, Type type, SimpleName name)TypePatternExpr(TokenRange tokenRange, NodeList<Modifier> modifiers, Type type, SimpleName name)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 interfaceNodeWithType<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 TypeNodeWithVariables. getCommonType()Returns the type that is shared between all variables.default TypeNodeWithVariables. 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 ParameterNodeWithParameters. addAndGetParameter(Type type, String name)default FieldDeclarationNodeWithMembers. addField(Type type, String name, Modifier.Keyword... modifiers)Add a field to this.default FieldDeclarationNodeWithMembers. addFieldWithInitializer(Type type, String name, Expression initializer, Modifier.Keyword... modifiers)Add a field to this.default NNodeWithParameters. addParameter(Type type, String name)default FieldDeclarationNodeWithMembers. addPrivateField(Type type, String name)Add a private field to this.default FieldDeclarationNodeWithMembers. addProtectedField(Type type, String name)Add a protected field to this.default FieldDeclarationNodeWithMembers. addPublicField(Type type, String name)Add a public field to this.default NNodeWithVariables. setAllTypes(Type newType)Sets the type of all variables.default NNodeWithTypeArguments. 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)NNodeWithTypeArguments. 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 ExplicitConstructorInvocationStmtExplicitConstructorInvocationStmt. 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 classArrayTypeTo indicate that a type is an array, it gets wrapped in an ArrayType for every array level it has.classClassOrInterfaceTypeA class or an interface type.classIntersectionTypeRepresents a set of types.classPrimitiveTypeA primitive type.classReferenceTypeBase class for reference types.classTypeParameterA type parameter.classUnionTypeThe union typeclassUnknownTypeAn unknown parameter type object.classVarTypeA type called "var" waiting for Java to infer it.classVoidTypeThe return type of aMethodDeclarationwhen it returns void.classWildcardTypeA wildcard type argument.Methods in com.github.javaparser.ast.type that return Type Modifier and Type Method Description TypeType. clone()TypeArrayType. getComponentType()TypeArrayType. getElementType()Finds the element type, meaning: the type without ArrayTypes around it.TypeType. getElementType()Finds the element type, meaning: the type without ArrayTypes around it.TypeType. setAnnotations(NodeList<AnnotationExpr> annotations)static TypeArrayType. 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 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 ArrayTypeArrayType. setComponentType(Type componentType)static Pair<Type,List<ArrayType.ArrayBracketPair>>ArrayType. unwrapArrayTypes(Type type)Takes a type that may be an ArrayType.static TypeArrayType. 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 Type Modifier and Type Method Description ClassOrInterfaceTypeClassOrInterfaceType. 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 ResolvedTypeDeclarationSolver. solveType(Type type)<T> TSymbolResolver. toResolvedType(Type javaparserType, Class<T> resultClass)For types it would find the corresponding resolved types.
-