public abstract class Type extends Node implements Resolvable<ResolvedType>
Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversal
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, SYMBOL_RESOLVER_KEY
Modifier | Constructor and Description |
---|---|
|
Type(NodeList<AnnotationExpr> annotations) |
protected |
Type(TokenRange range)
Several sub classes do not support annotations.
|
|
Type(TokenRange tokenRange,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
addOrphanComment, containsData, customInitialization, equals, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getDataKeys, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getSymbolResolver, getTokenRange, getToStringPrettyPrinterConfiguration, hashCode, isAncestorOf, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, setToStringPrettyPrinterConfiguration, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walk
finalize, getClass, notify, notifyAll, wait, wait, wait
findAncestor, findAncestor, isDescendantOf
containsWithin, containsWithinRange, getBegin, getEnd
protected Type(TokenRange range)
public Type(NodeList<AnnotationExpr> annotations)
public Type(TokenRange tokenRange, NodeList<AnnotationExpr> annotations)
public NodeList<AnnotationExpr> getAnnotations()
public AnnotationExpr getAnnotation(int i)
public Type setAnnotations(NodeList<AnnotationExpr> annotations)
public Type getElementType()
In "int[] a[];
", the element type is int.
public int getArrayLevel()
public abstract String asString()
public TypeMetaModel getMetaModel()
getMetaModel
in class Node
public boolean isArrayType()
public ArrayType asArrayType()
public boolean isClassOrInterfaceType()
public ClassOrInterfaceType asClassOrInterfaceType()
public boolean isIntersectionType()
public IntersectionType asIntersectionType()
public boolean isPrimitiveType()
public PrimitiveType asPrimitiveType()
public boolean isReferenceType()
public ReferenceType asReferenceType()
public boolean isTypeParameter()
public TypeParameter asTypeParameter()
public boolean isUnionType()
public UnionType asUnionType()
public boolean isUnknownType()
public UnknownType asUnknownType()
public boolean isVoidType()
public VoidType asVoidType()
public boolean isWildcardType()
public WildcardType asWildcardType()
public void ifClassOrInterfaceType(Consumer<ClassOrInterfaceType> action)
public void ifIntersectionType(Consumer<IntersectionType> action)
public void ifPrimitiveType(Consumer<PrimitiveType> action)
public void ifReferenceType(Consumer<ReferenceType> action)
public void ifTypeParameter(Consumer<TypeParameter> action)
public void ifUnknownType(Consumer<UnknownType> action)
public void ifWildcardType(Consumer<WildcardType> action)
public abstract ResolvedType resolve()
resolve
in interface Resolvable<ResolvedType>
public Optional<ClassOrInterfaceType> toClassOrInterfaceType()
public Optional<IntersectionType> toIntersectionType()
public Optional<PrimitiveType> toPrimitiveType()
public Optional<ReferenceType> toReferenceType()
public Optional<TypeParameter> toTypeParameter()
public Optional<UnknownType> toUnknownType()
public Optional<WildcardType> toWildcardType()
public boolean isVarType()
public VarType asVarType()
Copyright © 2007–2019. All rights reserved.