public class CtNewArrayImpl<T> extends CtExpressionImpl<T> implements CtNewArray<T>
ERROR_MESSAGE_TO_STRING, factory, LOGGER, parent
Constructor and Description |
---|
CtNewArrayImpl() |
Modifier and Type | Method and Description |
---|---|
void |
accept(CtVisitor visitor)
Accepts a visitor
|
<C extends CtNewArray<T>> |
addDimensionExpression(CtExpression<java.lang.Integer> dimension)
Adds a dimension expression.
|
<C extends CtNewArray<T>> |
addElement(CtExpression<?> expression)
Adds an element.
|
CtNewArray<T> |
clone()
Clone the element which calls this method in a new object.
|
java.util.List<CtExpression<java.lang.Integer>> |
getDimensionExpressions()
Gets the expressions that define the array's dimensions.
|
java.util.List<CtExpression<?>> |
getElements()
Gets the initialization expressions.
|
boolean |
removeDimensionExpression(CtExpression<java.lang.Integer> dimension)
Removes a dimension expression.
|
boolean |
removeElement(CtExpression<?> expression)
Removes an element.
|
<C extends CtNewArray<T>> |
setDimensionExpressions(java.util.List<CtExpression<java.lang.Integer>> dimensionExpressions)
Sets the expressions that define the array's dimensions.
|
<C extends CtNewArray<T>> |
setElements(java.util.List<CtExpression<?>> expressions)
Sets the initialization expressions.
|
addTypeCast, getType, getTypeCasts, S, setType, setTypeCasts
partiallyEvaluate
addAnnotation, addComment, asIterable, comment, delete, descendantIterator, emptyList, emptySet, equals, filterChildren, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getFactory, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hashCode, hasParent, isImplicit, isParentInitialized, map, map, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setFactory, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, unmodifiableList, updateAllParentsBelow
finalize, getClass, notify, notifyAll, wait, wait, wait
addTypeCast, getTypeCasts, setTypeCasts
partiallyEvaluate
getType, setType
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, updateAllParentsBelow
getFactory, setFactory
filterChildren, map, map
S
public void accept(CtVisitor visitor)
CtVisitable
accept
in interface CtVisitable
public java.util.List<CtExpression<java.lang.Integer>> getDimensionExpressions()
CtNewArray
getDimensionExpressions
in interface CtNewArray<T>
public java.util.List<CtExpression<?>> getElements()
CtNewArray
getElements
in interface CtNewArray<T>
public <C extends CtNewArray<T>> C setDimensionExpressions(java.util.List<CtExpression<java.lang.Integer>> dimensionExpressions)
CtNewArray
setDimensionExpressions
in interface CtNewArray<T>
public <C extends CtNewArray<T>> C addDimensionExpression(CtExpression<java.lang.Integer> dimension)
CtNewArray
addDimensionExpression
in interface CtNewArray<T>
public boolean removeDimensionExpression(CtExpression<java.lang.Integer> dimension)
CtNewArray
removeDimensionExpression
in interface CtNewArray<T>
public <C extends CtNewArray<T>> C setElements(java.util.List<CtExpression<?>> expressions)
CtNewArray
setElements
in interface CtNewArray<T>
public <C extends CtNewArray<T>> C addElement(CtExpression<?> expression)
CtNewArray
addElement
in interface CtNewArray<T>
public boolean removeElement(CtExpression<?> expression)
CtNewArray
removeElement
in interface CtNewArray<T>
public CtNewArray<T> clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.clone
in interface CtCodeElement
clone
in interface CtExpression<T>
clone
in interface CtNewArray<T>
clone
in interface CtElement
clone
in class CtExpressionImpl<T>
Copyright © 2007–2021 Inria. All rights reserved.