public class ArrayType extends ReferenceType implements NodeWithAnnotations<ArrayType>
| Modifier and Type | Class and Description |
|---|---|
static class |
ArrayType.ArrayBracketPair
Helper class that stores information about a pair of brackets in a non-recursive way
(unlike ArrayType.)
|
static class |
ArrayType.Origin
The origin of a pair of array brackets [].
|
Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversalABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, SYMBOL_RESOLVER_KEY| Constructor and Description |
|---|
ArrayType(TokenRange tokenRange,
Type componentType,
ArrayType.Origin origin,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
ArrayType(Type type,
AnnotationExpr... annotations) |
ArrayType(Type componentType,
ArrayType.Origin origin,
NodeList<AnnotationExpr> annotations) |
| Modifier and Type | Method and Description |
|---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
ArrayType |
asArrayType() |
String |
asString() |
ArrayType |
clone() |
Type |
getComponentType() |
ArrayTypeMetaModel |
getMetaModel() |
ArrayType.Origin |
getOrigin() |
void |
ifArrayType(Consumer<ArrayType> action) |
boolean |
isArrayType() |
boolean |
remove(Node node) |
boolean |
replace(Node node,
Node replacementNode) |
ResolvedArrayType |
resolve() |
ArrayType |
setAnnotations(NodeList<AnnotationExpr> annotations) |
ArrayType |
setComponentType(Type componentType) |
ArrayType |
setOrigin(ArrayType.Origin origin) |
Optional<ArrayType> |
toArrayType() |
static Pair<Type,List<ArrayType.ArrayBracketPair>> |
unwrapArrayTypes(Type type)
Takes a type that may be an ArrayType.
|
static Type |
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.
|
asReferenceType, ifReferenceType, isReferenceType, toReferenceTypeasClassOrInterfaceType, asIntersectionType, asPrimitiveType, asTypeParameter, asUnionType, asUnknownType, asVarType, asVoidType, asWildcardType, getAnnotation, getAnnotations, getArrayLevel, getElementType, ifClassOrInterfaceType, ifIntersectionType, ifPrimitiveType, ifTypeParameter, ifUnionType, ifUnknownType, ifVarType, ifVoidType, ifWildcardType, isClassOrInterfaceType, isIntersectionType, isPrimitiveType, isTypeParameter, isUnionType, isUnknownType, isVarType, isVoidType, isWildcardType, toClassOrInterfaceType, toIntersectionType, toPrimitiveType, toTypeParameter, toUnionType, toUnknownType, toVarType, toVoidType, toWildcardTypeaddOrphanComment, 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, 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, walkfinalize, getClass, notify, notifyAll, wait, wait, waitaddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, getAnnotations, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnitfindAncestor, findAncestorcontainsWithin, getBegin, getEndpublic ArrayType(Type componentType, ArrayType.Origin origin, NodeList<AnnotationExpr> annotations)
public ArrayType(Type type, AnnotationExpr... annotations)
public ArrayType(TokenRange tokenRange, Type componentType, ArrayType.Origin origin, NodeList<AnnotationExpr> annotations)
public ResolvedArrayType resolve()
resolve in interface Resolvable<ResolvedType>resolve in class Typepublic <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitableaccept in interface VisitableR - the type of the return value of the visitorA - the type the user argument passed to the visitorv - the visitor implementationarg - the argument passed to the visitor (of type A)public <A> void accept(VoidVisitor<A> v, A arg)
Visitablepublic Type getComponentType()
@SafeVarargs public static Type wrapInArrayTypes(Type type, List<ArrayType.ArrayBracketPair>... arrayBracketPairLists)
public static Pair<Type,List<ArrayType.ArrayBracketPair>> unwrapArrayTypes(Type type)
public ArrayType setAnnotations(NodeList<AnnotationExpr> annotations)
setAnnotations in interface NodeWithAnnotations<ArrayType>setAnnotations in class Typepublic ArrayType.Origin getOrigin()
public ArrayType setOrigin(ArrayType.Origin origin)
public boolean remove(Node node)
remove in class ReferenceTypepublic ArrayType clone()
clone in class ReferenceTypepublic ArrayTypeMetaModel getMetaModel()
getMetaModel in class ReferenceTypepublic boolean replace(Node node, Node replacementNode)
replace in class ReferenceTypepublic boolean isArrayType()
isArrayType in class Typepublic ArrayType asArrayType()
asArrayType in class Typepublic void ifArrayType(Consumer<ArrayType> action)
ifArrayType in class Typepublic Optional<ArrayType> toArrayType()
toArrayType in class TypeCopyright © 2007–2019. All rights reserved.