Uses of Interface
spoon.reflect.code.CtStatement
-
Packages that use CtStatement Package Description spoon.reflect.code This package contains the meta-model part that models the executable code (methods and constructors' bodies, field initializers).spoon.reflect.declaration This package contains the meta-model part that models the declarations (program's structures such as classes, fields, etc).spoon.reflect.factory This package defines all the sub-factories for the Spoon meta-model.spoon.reflect.visitor This package defines visitor, scanner, and scanner-based query API for Java programs reified in the meta-model.spoon.reflect.visitor.filter This package contains a set of useful filters when querying the model.spoon.support.compiler spoon.support.reflect.code spoon.support.reflect.declaration spoon.support.visitor.clone spoon.support.visitor.equals spoon.template This package defines a framework for well-typed pure-Java templates. -
-
Uses of CtStatement in spoon.reflect.code
Subinterfaces of CtStatement in spoon.reflect.code Modifier and Type Interface Description interface
CtAssert<T>
This code element defines an assert clause.interface
CtAssignment<T,A extends T>
This code element defines an assignment.interface
CtBlock<R>
This code element represents a block of code, that is to say a list of statements enclosed in curly brackets.interface
CtBreak
This code element defines a break statement.interface
CtCase<S>
This code element defines a case within a switch-case.interface
CtCFlowBreak
This abstract code element represents all the statements that break the control flow of the program.interface
CtCodeSnippetStatement
This element is a code snippet that must represent a statement and can thus be inserted in the program's model as is.interface
CtComment
This code element defines a comment Example:int x = 0; // a comment
interface
CtConstructorCall<T>
This code element represents a constructor call.interface
CtContinue
This code element defines the continue statement.interface
CtDo
This code element defines ado
loop.interface
CtFor
This code element defines a for loop.interface
CtForEach
This code element defines a foreach statement.interface
CtIf
This code element represents anif
statement.interface
CtInvocation<T>
This code element defines a concrete invocation.interface
CtJavaDoc
This code element defines a javadoc comment Example:interface
CtLabelledFlowBreak
This abstract code element represents all the statements that break the control flow of the program and which can support a label.interface
CtLocalVariable<T>
This code element defines a local variable definition (within an executable body).interface
CtLoop
This abstract code element defines a loop.interface
CtNewClass<T>
This code element represents the creation of a anonymous class.interface
CtOperatorAssignment<T,A extends T>
This code element defines an self-operated assignment such as += or *=.interface
CtReturn<R>
This code element represents areturn
statement.interface
CtSwitch<S>
This code element defines a switch statement.interface
CtSynchronized
This code element defines asynchronized
statement.interface
CtThrow
This code element defines athrow
statement.interface
CtTry
This code element defines atry
statement.interface
CtTryWithResource
This code element defines atry
with resource statement.interface
CtUnaryOperator<T>
This code element represents a unary operator.interface
CtWhile
This code element defines awhile
loop.interface
CtYieldStatement
This code element defines ayield
statement.Methods in spoon.reflect.code with type parameters of type CtStatement Modifier and Type Method Description <S extends CtStatement>
SCtCodeSnippetStatement. compile()
Compiles this statement code snippet to produce the corresponding AST statement.<S extends CtStatement>
SCtIf. getElseStatement()
Gets the statement executed when the condition is false.<T extends CtStatement>
TCtStatementList. getLastStatement()
Gets the last statement of this block.<T extends CtStatement>
TCtStatementList. getStatement(int i)
Gets the ith statement of this block.<S extends CtStatement>
SCtIf. getThenStatement()
Gets the statement executed when the condition is true.<T extends CtStatement>
TCtStatement. insertAfter(CtStatement statement)
Inserts a statement after the current statement.<T extends CtStatement>
TCtStatement. insertAfter(CtStatementList statements)
Inserts a statement list before the current statement.<T extends CtStatement>
TCtStatement. insertBefore(CtStatement statement)
Inserts a statement given as parameter before the current statement (this).<T extends CtStatement>
TCtStatement. insertBefore(CtStatementList statements)
Inserts a statement list before the current statement.<T extends CtStatement>
TCtStatement. setLabel(String label)
Sets the label of this statement.Methods in spoon.reflect.code that return CtStatement Modifier and Type Method Description CtStatement
CtStatement. clone()
CtStatement
CtBodyHolder. getBody()
Gets the body of this elementCtStatement
CtLoop. getBody()
Gets the body of this loop.CtStatement
CtLabelledFlowBreak. getLabelledStatement()
Methods in spoon.reflect.code that return types with arguments of type CtStatement Modifier and Type Method Description List<CtStatement>
CtFor. getForInit()
Gets the init statements.List<CtStatement>
CtFor. getForUpdate()
Gets the update statements.List<CtStatement>
CtStatementList. getStatements()
Returns the statement list.Methods in spoon.reflect.code with parameters of type CtStatement Modifier and Type Method Description <T extends CtFor>
TCtFor. addForInit(CtStatement statement)
Adds an init statement.<T extends CtFor>
TCtFor. addForUpdate(CtStatement statement)
Adds an update statement.<T extends CtStatementList>
TCtStatementList. addStatement(int index, CtStatement statement)
Inserts the given statement at a specific position in the list of statements Shifts the statement currently at that position (if any) and any subsequent statements to the right (adds one to their indices).<T extends CtStatementList>
TCtStatementList. addStatement(CtStatement statement)
Adds a statement at the end of the list.<T extends CtStatement>
TCtStatement. insertAfter(CtStatement statement)
Inserts a statement after the current statement.<T extends CtStatementList>
TCtStatementList. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
Inserts the given statement after a set of insertion points given by a filter.<T extends CtStatement>
TCtStatement. insertBefore(CtStatement statement)
Inserts a statement given as parameter before the current statement (this).<T extends CtStatementList>
TCtStatementList. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
Inserts the given statement before a set of insertion points given by a filter.<T extends CtStatementList>
TCtStatementList. insertBegin(CtStatement statement)
Inserts the given statement at the beginning of the block.<T extends CtStatementList>
TCtStatementList. insertEnd(CtStatement statement)
Inserts the given statement at the end of the block.boolean
CtFor. removeForInit(CtStatement statement)
Removes an init statement.boolean
CtFor. removeForUpdate(CtStatement statement)
Removes an update statement.void
CtStatementList. removeStatement(CtStatement statement)
Removes a statement.<T extends CtBodyHolder>
TCtBodyHolder. setBody(CtStatement body)
Sets the body of this element.<T extends CtIf>
TCtIf. setElseStatement(CtStatement elseStatement)
Sets the statement executed when the condition is false.<T extends CtIf>
TCtIf. setThenStatement(CtStatement thenStatement)
Sets the statement executed when the condition is true.Method parameters in spoon.reflect.code with type arguments of type CtStatement Modifier and Type Method Description <T extends CtStatementList>
TCtStatementList. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
Inserts the given statement after a set of insertion points given by a filter.<T extends CtStatementList>
TCtStatementList. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
Inserts the given statement list after a set of insertion points given by a filter.<T extends CtStatementList>
TCtStatementList. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
Inserts the given statement before a set of insertion points given by a filter.<T extends CtStatementList>
TCtStatementList. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
Inserts the given statement list before a set of insertion points given by a filter.<T extends CtFor>
TCtFor. setForInit(List<CtStatement> forInit)
Sets the init statements.<T extends CtFor>
TCtFor. setForUpdate(List<CtStatement> forUpdate)
Sets the update statements.<T extends CtStatementList>
TCtStatementList. setStatements(List<CtStatement> statements)
Sets the statement list. -
Uses of CtStatement in spoon.reflect.declaration
Subinterfaces of CtStatement in spoon.reflect.declaration Modifier and Type Interface Description interface
CtClass<T>
This element represents a class declaration.interface
CtEnum<T extends Enum<?>>
This element represents an enumeration declaration.Methods in spoon.reflect.declaration with type parameters of type CtStatement Modifier and Type Method Description <C extends CtStatement>
CCtClass. setLabel(String label)
Methods in spoon.reflect.declaration with parameters of type CtStatement Modifier and Type Method Description <T1 extends CtBodyHolder>
T1CtAnnotationMethod. setBody(CtStatement body)
-
Uses of CtStatement in spoon.reflect.factory
Methods in spoon.reflect.factory with type parameters of type CtStatement Modifier and Type Method Description <T extends CtStatement>
CtBlock<?>CodeFactory. createCtBlock(T element)
Creates a block.<T extends CtStatement>
CtBlock<?>Factory. createCtBlock(T element)
<T extends CtStatement>
CtBlock<?>FactoryImpl. createCtBlock(T element)
<T extends CtStatement>
CtBlock<?>CodeFactory. getOrCreateCtBlock(T element)
Accepts instance of CtStatement or CtBlock. -
Uses of CtStatement in spoon.reflect.visitor
Methods in spoon.reflect.visitor with parameters of type CtStatement Modifier and Type Method Description protected void
DefaultJavaPrettyPrinter. enterCtStatement(CtStatement s)
Enters a statement.protected void
DefaultJavaPrettyPrinter. exitCtStatement(CtStatement statement)
Exits a statement.boolean
PrintingContext. isStatement(CtStatement stmt)
void
CtInheritanceScanner. scanCtStatement(CtStatement s)
Scans an abstract statement.<T extends PrintingContext.Writable>
TPrintingContext.Writable. setStatement(CtStatement stmt)
There are statements (e.g.void
ElementPrinterHelper. writeIfOrLoopBlock(CtStatement block)
write all non-implicit parts of a block, with special care for indentationvoid
ElementPrinterHelper. writeStatement(CtStatement statement)
Writes a statement. -
Uses of CtStatement in spoon.reflect.visitor.filter
Methods in spoon.reflect.visitor.filter with parameters of type CtStatement Modifier and Type Method Description boolean
LineFilter. matches(CtStatement element)
-
Uses of CtStatement in spoon.support.compiler
Methods in spoon.support.compiler that return CtStatement Modifier and Type Method Description static CtStatement
SnippetCompilationHelper. compileStatement(CtCodeSnippetStatement st)
static CtStatement
SnippetCompilationHelper. compileStatement(CtCodeSnippetStatement st, CtTypeReference returnType)
-
Uses of CtStatement in spoon.support.reflect.code
Classes in spoon.support.reflect.code that implement CtStatement Modifier and Type Class Description class
CtAssertImpl<T>
class
CtAssignmentImpl<T,A extends T>
class
CtBlockImpl<R>
class
CtBreakImpl
class
CtCaseImpl<E>
class
CtCodeSnippetStatementImpl
class
CtCommentImpl
class
CtConstructorCallImpl<T>
class
CtContinueImpl
class
CtDoImpl
class
CtForEachImpl
class
CtForImpl
class
CtIfImpl
class
CtInvocationImpl<T>
class
CtJavaDocImpl
class
CtLocalVariableImpl<T>
class
CtLoopImpl
class
CtNewClassImpl<T>
class
CtOperatorAssignmentImpl<T,A extends T>
class
CtReturnImpl<R>
class
CtStatementImpl
class
CtSwitchImpl<S>
class
CtSynchronizedImpl
class
CtThrowImpl
class
CtTryImpl
class
CtTryWithResourceImpl
class
CtUnaryOperatorImpl<T>
class
CtWhileImpl
class
CtYieldStatementImpl
CtYieldStatementImplMethods in spoon.support.reflect.code with type parameters of type CtStatement Modifier and Type Method Description <S extends CtStatement>
SCtCodeSnippetStatementImpl. compile()
<S extends CtStatement>
SCtIfImpl. getElseStatement()
<T extends CtStatement>
TCtBlockImpl. getLastStatement()
<T extends CtStatement>
TCtCaseImpl. getLastStatement()
<T extends CtStatement>
TCtStatementListImpl. getLastStatement()
<T extends CtStatement>
TCtBlockImpl. getStatement(int i)
<T extends CtStatement>
TCtCaseImpl. getStatement(int i)
<T extends CtStatement>
TCtStatementListImpl. getStatement(int i)
<S extends CtStatement>
SCtIfImpl. getThenStatement()
<C extends CtStatement>
CCtConstructorCallImpl. insertAfter(CtStatement statement)
<C extends CtStatement>
CCtConstructorCallImpl. insertAfter(CtStatementList statements)
<C extends CtStatement>
CCtInvocationImpl. insertAfter(CtStatement statement)
<C extends CtStatement>
CCtInvocationImpl. insertAfter(CtStatementList statements)
<T extends CtStatement>
TCtStatementImpl. insertAfter(CtStatement statement)
<T extends CtStatement>
TCtStatementImpl. insertAfter(CtStatementList statements)
<C extends CtStatement>
CCtUnaryOperatorImpl. insertAfter(CtStatement statement)
<C extends CtStatement>
CCtUnaryOperatorImpl. insertAfter(CtStatementList statements)
<C extends CtStatement>
CCtConstructorCallImpl. insertBefore(CtStatement statement)
<C extends CtStatement>
CCtConstructorCallImpl. insertBefore(CtStatementList statements)
<C extends CtStatement>
CCtInvocationImpl. insertBefore(CtStatement statement)
<C extends CtStatement>
CCtInvocationImpl. insertBefore(CtStatementList statements)
<T extends CtStatement>
TCtStatementImpl. insertBefore(CtStatement statement)
<T extends CtStatement>
TCtStatementImpl. insertBefore(CtStatementList statements)
<C extends CtStatement>
CCtUnaryOperatorImpl. insertBefore(CtStatement statement)
<C extends CtStatement>
CCtUnaryOperatorImpl. insertBefore(CtStatementList statements)
<C extends CtStatement>
CCtConstructorCallImpl. setLabel(String label)
<C extends CtStatement>
CCtInvocationImpl. setLabel(String label)
<T extends CtStatement>
TCtStatementImpl. setLabel(String label)
<C extends CtStatement>
CCtUnaryOperatorImpl. setLabel(String label)
Methods in spoon.support.reflect.code that return CtStatement Modifier and Type Method Description CtStatement
CtStatementImpl. clone()
CtStatement
CtLoopImpl. getBody()
CtStatement
CtBreakImpl. getLabelledStatement()
CtStatement
CtContinueImpl. getLabelledStatement()
Methods in spoon.support.reflect.code that return types with arguments of type CtStatement Modifier and Type Method Description List<CtStatement>
CtForImpl. getForInit()
List<CtStatement>
CtForImpl. getForUpdate()
List<CtStatement>
CtBlockImpl. getStatements()
List<CtStatement>
CtCaseImpl. getStatements()
List<CtStatement>
CtStatementListImpl. getStatements()
Iterator<CtStatement>
CtBlockImpl. iterator()
Iterator<CtStatement>
CtCaseImpl. iterator()
Iterator<CtStatement>
CtStatementListImpl. iterator()
Methods in spoon.support.reflect.code with parameters of type CtStatement Modifier and Type Method Description <T extends CtFor>
TCtForImpl. addForInit(CtStatement statement)
<T extends CtFor>
TCtForImpl. addForUpdate(CtStatement statement)
<T extends CtStatementList>
TCtBlockImpl. addStatement(int index, CtStatement statement)
<T extends CtStatementList>
TCtBlockImpl. addStatement(CtStatement statement)
<T extends CtStatementList>
TCtCaseImpl. addStatement(int index, CtStatement statement)
<T extends CtStatementList>
TCtCaseImpl. addStatement(CtStatement statement)
<T extends CtStatementList>
TCtStatementListImpl. addStatement(int index, CtStatement statement)
<T extends CtStatementList>
TCtStatementListImpl. addStatement(CtStatement statement)
<T extends CtStatementList>
TCtBlockImpl. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtCaseImpl. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<C extends CtStatement>
CCtConstructorCallImpl. insertAfter(CtStatement statement)
<C extends CtStatement>
CCtInvocationImpl. insertAfter(CtStatement statement)
<T extends CtStatement>
TCtStatementImpl. insertAfter(CtStatement statement)
static void
CtStatementImpl. insertAfter(CtStatement target, CtStatement statement)
static void
CtStatementImpl. insertAfter(CtStatement target, CtStatementList statements)
<T extends CtStatementList>
TCtStatementListImpl. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<C extends CtStatement>
CCtUnaryOperatorImpl. insertAfter(CtStatement statement)
<T extends CtStatementList>
TCtBlockImpl. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtCaseImpl. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<C extends CtStatement>
CCtConstructorCallImpl. insertBefore(CtStatement statement)
<C extends CtStatement>
CCtInvocationImpl. insertBefore(CtStatement statement)
<T extends CtStatement>
TCtStatementImpl. insertBefore(CtStatement statement)
static void
CtStatementImpl. insertBefore(CtStatement target, CtStatement statement)
insert `statement` just before targetstatic void
CtStatementImpl. insertBefore(CtStatement target, CtStatementList statementsToBeInserted)
inserts all statements of `statementsToBeInserted` just before `target`<T extends CtStatementList>
TCtStatementListImpl. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<C extends CtStatement>
CCtUnaryOperatorImpl. insertBefore(CtStatement statement)
<T extends CtStatementList>
TCtBlockImpl. insertBegin(CtStatement statement)
<T extends CtStatementList>
TCtCaseImpl. insertBegin(CtStatement statement)
<T extends CtStatementList>
TCtStatementListImpl. insertBegin(CtStatement statement)
<T extends CtStatementList>
TCtBlockImpl. insertEnd(CtStatement statement)
<T extends CtStatementList>
TCtCaseImpl. insertEnd(CtStatement statement)
<T extends CtStatementList>
TCtStatementListImpl. insertEnd(CtStatement statement)
boolean
CtForImpl. removeForInit(CtStatement statement)
boolean
CtForImpl. removeForUpdate(CtStatement statement)
void
CtBlockImpl. removeStatement(CtStatement statement)
void
CtCaseImpl. removeStatement(CtStatement statement)
void
CtStatementListImpl. removeStatement(CtStatement statement)
<T extends CtBodyHolder>
TCtCatchImpl. setBody(CtStatement statement)
<C extends CtBodyHolder>
CCtLambdaImpl. setBody(CtStatement statement)
<T extends CtBodyHolder>
TCtLoopImpl. setBody(CtStatement statement)
<T extends CtBodyHolder>
TCtTryImpl. setBody(CtStatement statement)
<T extends CtIf>
TCtIfImpl. setElseStatement(CtStatement elseStatement)
<T extends CtIf>
TCtIfImpl. setThenStatement(CtStatement thenStatement)
Method parameters in spoon.support.reflect.code with type arguments of type CtStatement Modifier and Type Method Description <T extends CtStatementList>
TCtBlockImpl. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtBlockImpl. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
<T extends CtStatementList>
TCtCaseImpl. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtCaseImpl. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
<T extends CtStatementList>
TCtStatementListImpl. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtStatementListImpl. insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
<T extends CtStatementList>
TCtBlockImpl. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtBlockImpl. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
<T extends CtStatementList>
TCtCaseImpl. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtCaseImpl. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
<T extends CtStatementList>
TCtStatementListImpl. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtStatementListImpl. insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
<T extends CtFor>
TCtForImpl. setForInit(List<CtStatement> statements)
<T extends CtFor>
TCtForImpl. setForUpdate(List<CtStatement> statements)
<T extends CtStatementList>
TCtBlockImpl. setStatements(List<CtStatement> statements)
<T extends CtStatementList>
TCtCaseImpl. setStatements(List<CtStatement> statements)
<T extends CtStatementList>
TCtStatementListImpl. setStatements(List<CtStatement> stmts)
-
Uses of CtStatement in spoon.support.reflect.declaration
Classes in spoon.support.reflect.declaration that implement CtStatement Modifier and Type Class Description class
CtClassImpl<T>
The implementation forCtClass
.class
CtEnumImpl<T extends Enum<?>>
Methods in spoon.support.reflect.declaration with type parameters of type CtStatement Modifier and Type Method Description <C extends CtStatement>
CCtClassImpl. insertAfter(CtStatement statement)
<C extends CtStatement>
CCtClassImpl. insertAfter(CtStatementList statements)
<C extends CtStatement>
CCtClassImpl. insertBefore(CtStatement statement)
<C extends CtStatement>
CCtClassImpl. insertBefore(CtStatementList statements)
<C extends CtStatement>
CCtClassImpl. setLabel(String label)
Methods in spoon.support.reflect.declaration with parameters of type CtStatement Modifier and Type Method Description <C extends CtStatement>
CCtClassImpl. insertAfter(CtStatement statement)
<C extends CtStatement>
CCtClassImpl. insertBefore(CtStatement statement)
<T extends CtBodyHolder>
TCtAnnotationMethodImpl. setBody(CtStatement statement)
<T extends CtBodyHolder>
TCtExecutableImpl. setBody(CtStatement statement)
-
Uses of CtStatement in spoon.support.visitor.clone
Methods in spoon.support.visitor.clone with parameters of type CtStatement Modifier and Type Method Description void
CloneBuilder. scanCtStatement(CtStatement s)
Scans an abstract statement. -
Uses of CtStatement in spoon.support.visitor.equals
Methods in spoon.support.visitor.equals with parameters of type CtStatement Modifier and Type Method Description void
EqualsChecker. scanCtStatement(CtStatement s)
-
Uses of CtStatement in spoon.template
Methods in spoon.template that return CtStatement Modifier and Type Method Description CtStatement
StatementTemplate. apply(CtType<?> targetType)
static CtStatement
Substitution. substituteStatement(CtClass<?> targetClass, Template<?> template, int statementIndex, String executableName, CtTypeReference<?>... parameterTypes)
Gets a statement from a template executable with all the template parameters substituted.
-