Uses of Interface
spoon.reflect.code.CtStatement
Package
Description
This package contains the meta-model part that models the executable code (methods and constructors' bodies, field initializers).
This package contains the meta-model part that models the declarations (program's structures such as classes, fields, etc).
This package defines all the sub-factories for the Spoon meta-model.
This package defines visitor, scanner, and scanner-based query API for Java programs reified in the meta-model.
This package contains a set of useful filters when querying the model.
This package defines a framework for well-typed pure-Java templates.
-
Uses of CtStatement in spoon.reflect.code
Modifier and TypeInterfaceDescriptioninterface
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
This code element defines a break statement.interface
CtCase<S>
This code element defines a case within a switch-case.interface
This abstract code element represents all the statements that break the control flow of the program.interface
This element is a code snippet that must represent a statement and can thus be inserted in the program's model as is.interface
This code element defines a comment Example:int x = 0; // a comment
interface
This code element represents a constructor call.interface
This code element defines the continue statement.interface
This code element defines ado
loop.interface
This code element defines a for loop.interface
This code element defines a foreach statement.interface
This code element represents anif
statement.interface
CtInvocation<T>
This code element defines a concrete invocation.interface
This code element defines a javadoc comment Example:interface
This abstract code element represents all the statements that break the control flow of the program and which can support a label.interface
This code element defines a local variable definition (within an executable body).interface
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
This code element defines asynchronized
statement.interface
This code element defines athrow
statement.interface
This code element defines atry
statement.interface
This code element defines atry
with resource statement.interface
This code element represents a unary operator.interface
This code element defines awhile
loop.interface
This code element defines ayield
statement.Modifier and TypeMethodDescription<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>
TSets the label of this statement.Modifier and TypeMethodDescriptionCtStatement.clone()
CtBodyHolder.getBody()
Gets the body of this elementCtLoop.getBody()
Gets the body of this loop.CtLabelledFlowBreak.getLabelledStatement()
Modifier and TypeMethodDescriptionCtFor.getForInit()
Gets the init statements.CtFor.getForUpdate()
Gets the update statements.CtStatementList.getStatements()
Returns the statement list.Modifier and TypeMethodDescription<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.Modifier and TypeMethodDescription<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
Modifier and TypeInterfaceDescriptioninterface
CtClass<T>
This element represents a class declaration.interface
This element represents an enumeration declaration.interface
CtInterface<T>
This element defines an interface declaration.interface
This element represents a record declaration.Modifier and TypeMethodDescription<T1 extends CtBodyHolder>
T1CtAnnotationMethod.setBody(CtStatement body)
-
Uses of CtStatement in spoon.reflect.factory
Modifier and TypeMethodDescription<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
Modifier and TypeMethodDescriptionprotected 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
-
Uses of CtStatement in spoon.support.compiler
Modifier and TypeMethodDescriptionstatic CtStatement
SnippetCompilationHelper.compileStatement(CtCodeSnippetStatement st)
static CtStatement
SnippetCompilationHelper.compileStatement(CtCodeSnippetStatement st, CtTypeReference returnType)
-
Uses of CtStatement in spoon.support.reflect.code
Modifier and TypeClassDescriptionclass
CtAssertImpl<T>
class
CtAssignmentImpl<T,A extends T>
class
CtBlockImpl<R>
class
class
CtCaseImpl<E>
class
class
class
class
class
class
class
class
class
class
class
class
class
class
CtOperatorAssignmentImpl<T,A extends T>
class
CtReturnImpl<R>
class
class
CtSwitchImpl<S>
class
class
class
class
class
class
class
CtYieldStatementImplModifier and TypeMethodDescription<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>
C<C extends CtStatement>
C<T extends CtStatement>
T<C extends CtStatement>
CModifier and TypeMethodDescriptionCtStatementImpl.clone()
CtLoopImpl.getBody()
CtBreakImpl.getLabelledStatement()
CtContinueImpl.getLabelledStatement()
Modifier and TypeMethodDescriptionCtForImpl.getForInit()
CtForImpl.getForUpdate()
CtBlockImpl.getStatements()
CtCaseImpl.getStatements()
CtStatementListImpl.getStatements()
CtBlockImpl.iterator()
CtCaseImpl.iterator()
CtStatementListImpl.iterator()
Modifier and TypeMethodDescription<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)
Modifier and TypeMethodDescription<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
Modifier and TypeClassDescriptionclass
CtClassImpl<T>
The implementation forCtClass
.class
CtEnumImpl<T extends Enum<?>>
class
class
Modifier and TypeMethodDescription<C extends CtStatement>
CCtClassImpl.insertAfter(CtStatement statement)
<C extends CtStatement>
CCtClassImpl.insertAfter(CtStatementList statements)
<C extends CtStatement>
CCtInterfaceImpl.insertAfter(CtStatement statement)
<C extends CtStatement>
CCtInterfaceImpl.insertAfter(CtStatementList statements)
<C extends CtStatement>
CCtClassImpl.insertBefore(CtStatement statement)
<C extends CtStatement>
CCtClassImpl.insertBefore(CtStatementList statements)
<C extends CtStatement>
CCtInterfaceImpl.insertBefore(CtStatement statement)
<C extends CtStatement>
CCtInterfaceImpl.insertBefore(CtStatementList statements)
<C extends CtStatement>
C<C extends CtStatement>
CModifier and TypeMethodDescription<C extends CtStatement>
CCtClassImpl.insertAfter(CtStatement statement)
<C extends CtStatement>
CCtInterfaceImpl.insertAfter(CtStatement statement)
<C extends CtStatement>
CCtClassImpl.insertBefore(CtStatement statement)
<C extends CtStatement>
CCtInterfaceImpl.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
Modifier and TypeMethodDescriptionvoid
CloneBuilder.scanCtStatement(CtStatement s)
Scans an abstract statement. -
Uses of CtStatement in spoon.support.visitor.equals
-
Uses of CtStatement in spoon.template
Modifier and TypeMethodDescriptionstatic 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.