public class CtCodeSnippetExpressionImpl<T> extends CtExpressionImpl<T> implements CtCodeSnippetExpression<T>
ERROR_MESSAGE_TO_STRING, factory, LOGGER, parent
Constructor and Description |
---|
CtCodeSnippetExpressionImpl() |
Modifier and Type | Method and Description |
---|---|
void |
accept(CtVisitor visitor)
Accepts a visitor
|
CtCodeSnippetExpression<T> |
clone()
Clone the element which calls this method in a new object.
|
<E extends CtExpression<T>> |
compile()
Compiles this expression snippet to produce the corresponding AST expression.
|
java.lang.String |
getValue()
Gets the textual value of the code.
|
<C extends CtCodeSnippet> |
setValue(java.lang.String value)
Sets the textual value of the code.
|
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.lang.String getValue()
CtCodeSnippet
getValue
in interface CtCodeSnippet
public <C extends CtCodeSnippet> C setValue(java.lang.String value)
CtCodeSnippet
setValue
in interface CtCodeSnippet
public <E extends CtExpression<T>> E compile() throws SnippetCompilationError
CtCodeSnippetExpression
compile
in interface CtCodeSnippetExpression<T>
SnippetCompilationError
- when the current snippet is not valid Java code expressionpublic CtCodeSnippetExpression<T> clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.clone
in interface CtCodeElement
clone
in interface CtCodeSnippetExpression<T>
clone
in interface CtExpression<T>
clone
in interface CtElement
clone
in class CtExpressionImpl<T>
Copyright © 2007–2021 Inria. All rights reserved.