public abstract class CtStatementImpl extends CtCodeElementImpl implements CtStatement
ERROR_MESSAGE_TO_STRING, factory, LOGGER, parent
Constructor and Description |
---|
CtStatementImpl() |
Modifier and Type | Method and Description |
---|---|
CtStatement |
clone()
Clone the element which calls this method in a new object.
|
java.lang.String |
getLabel()
Gets the label of this statement if defined.
|
<T extends CtStatement> |
insertAfter(CtStatement statement)
Inserts a statement after the current statement.
|
static void |
insertAfter(CtStatement target,
CtStatement statement) |
static void |
insertAfter(CtStatement target,
CtStatementList statements) |
<T extends CtStatement> |
insertAfter(CtStatementList statements)
Inserts a statement list before the current statement.
|
<T extends CtStatement> |
insertBefore(CtStatement statement)
Inserts a statement given as parameter before the current statement
(this).
|
static void |
insertBefore(CtStatement target,
CtStatement statement)
insert `statement` just before target
|
static void |
insertBefore(CtStatement target,
CtStatementList statementsToBeInserted)
inserts all statements of `statementsToBeInserted` just before `target`
|
<T extends CtStatement> |
insertBefore(CtStatementList statements)
Inserts a statement list before the current statement.
|
<T extends CtStatement> |
setLabel(java.lang.String label)
Sets the label of this statement.
|
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
comment
partiallyEvaluate
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
accept
filterChildren, map, map
public static void insertAfter(CtStatement target, CtStatement statement) throws ParentNotInitializedException
ParentNotInitializedException
public static void insertAfter(CtStatement target, CtStatementList statements) throws ParentNotInitializedException
ParentNotInitializedException
public static void insertBefore(CtStatement target, CtStatement statement) throws ParentNotInitializedException
ParentNotInitializedException
public static void insertBefore(CtStatement target, CtStatementList statementsToBeInserted) throws ParentNotInitializedException
ParentNotInitializedException
public <T extends CtStatement> T insertBefore(CtStatement statement) throws ParentNotInitializedException
CtStatement
insertBefore
in interface CtStatement
ParentNotInitializedException
public <T extends CtStatement> T insertBefore(CtStatementList statements) throws ParentNotInitializedException
CtStatement
insertBefore
in interface CtStatement
ParentNotInitializedException
public <T extends CtStatement> T insertAfter(CtStatement statement) throws ParentNotInitializedException
CtStatement
insertAfter
in interface CtStatement
ParentNotInitializedException
public <T extends CtStatement> T insertAfter(CtStatementList statements) throws ParentNotInitializedException
CtStatement
insertAfter
in interface CtStatement
ParentNotInitializedException
public java.lang.String getLabel()
CtStatement
getLabel
in interface CtStatement
public <T extends CtStatement> T setLabel(java.lang.String label)
CtStatement
setLabel
in interface CtStatement
public CtStatement clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.clone
in interface CtCodeElement
clone
in interface CtStatement
clone
in interface CtElement
clone
in class CtCodeElementImpl
Copyright © 2007–2021 Inria. All rights reserved.