public final class ReferenceType extends Type
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE
Constructor and Description |
---|
ReferenceType() |
ReferenceType(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Type type,
int arrayCount) |
ReferenceType(int beginLine,
int beginColumn,
int endLine,
int endColumn,
Type type,
int arrayCount,
java.util.List<AnnotationExpr> annotations,
java.util.List<java.util.List<AnnotationExpr>> arraysAnnotations) |
ReferenceType(Type type) |
ReferenceType(Type type,
int arrayCount) |
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.
|
int |
getArrayCount() |
java.util.List<java.util.List<AnnotationExpr>> |
getArraysAnnotations()
Arrays annotations are annotations on the arrays modifiers of the type.
|
Type |
getType() |
void |
setArrayCount(int arrayCount) |
void |
setArraysAnnotations(java.util.List<java.util.List<AnnotationExpr>> arraysAnnotations)
For a description of the arrayAnnotations field refer to
getArraysAnnotations() |
void |
setType(Type type) |
getAnnotations, setAnnotations
addOrphanComment, clone, contains, equals, getAllContainedComments, getBeginColumn, getBeginLine, getChildrenNodes, getComment, getData, getEndColumn, getEndLine, getOrphanComments, getParentNode, hasComment, hashCode, isPositionedAfter, isPositionedBefore, setAsParentNodeOf, setAsParentNodeOf, setBeginColumn, setBeginLine, setComment, setData, setEndColumn, setEndLine, setParentNode, toString, toStringWithoutComments
public ReferenceType()
public ReferenceType(Type type)
public ReferenceType(Type type, int arrayCount)
public ReferenceType(int beginLine, int beginColumn, int endLine, int endColumn, Type type, int arrayCount)
public ReferenceType(int beginLine, int beginColumn, int endLine, int endColumn, Type type, int arrayCount, java.util.List<AnnotationExpr> annotations, java.util.List<java.util.List<AnnotationExpr>> arraysAnnotations)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Node
public <A> void accept(VoidVisitor<A> v, A arg)
Node
public int getArrayCount()
public Type getType()
public void setArrayCount(int arrayCount)
public void setType(Type type)
public java.util.List<java.util.List<AnnotationExpr>> getArraysAnnotations()
Arrays annotations are annotations on the arrays modifiers of the type. Consider this example:
int @Ann1 [] @Ann2 [] array;
in this this method will return a list with the annotation expressions
@Ann1and
@Ann2
Note that the first list element of arraysAnnotations will refer to the first array modifier encountered. Considering the example the first element will be a list containing just @Ann1 while the second element will be a list containing just @Ann2.
This property is guaranteed to hold:
getArraysAnnotations().size() == getArrayCount()
If a certain array modifier has no annotation the corresponding entry of arraysAnnotations will be nullpublic void setArraysAnnotations(java.util.List<java.util.List<AnnotationExpr>> arraysAnnotations)
getArraysAnnotations()
Copyright © 2007-2015. All Rights Reserved.