Uses of Interface
spoon.reflect.code.CtStatement
Packages that use 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
Subinterfaces of CtStatement in spoon.reflect.codeModifier and TypeInterfaceDescriptioninterfaceCtAssert<T>This code element defines an assert clause.interfaceCtAssignment<T,A extends T>This code element defines an assignment.interfaceCtBlock<R>This code element represents a block of code, that is to say a list of statements enclosed in curly brackets.interfaceThis code element defines a break statement.interfaceCtCase<S>This code element defines a case within a switch-case.interfaceThis abstract code element represents all the statements that break the control flow of the program.interfaceThis element is a code snippet that must represent a statement and can thus be inserted in the program's model as is.interfaceThis code element defines a comment Example:int x = 0; // a commentinterfaceThis code element represents a constructor call.interfaceThis code element defines the continue statement.interfaceThis code element defines adoloop.interfaceThis code element defines a for loop.interfaceThis code element defines a foreach statement.interfaceThis code element represents anifstatement.interfaceCtInvocation<T>This code element defines a concrete invocation.interfaceThis code element defines a javadoc comment Example:interfaceThis abstract code element represents all the statements that break the control flow of the program and which can support a label.interfaceThis code element defines a local variable definition (within an executable body).interfaceThis abstract code element defines a loop.interfaceCtNewClass<T>This code element represents the creation of a anonymous class.interfaceCtOperatorAssignment<T,A extends T>This code element defines an self-operated assignment such as += or *=.interfaceCtReturn<R>This code element represents areturnstatement.interfaceCtSwitch<S>This code element defines a switch statement.interfaceThis code element defines asynchronizedstatement.interfaceThis code element defines athrowstatement.interfaceThis code element defines atrystatement.interfaceThis code element defines atrywith resource statement.interfaceThis code element represents a unary operator.interfaceThis code element defines awhileloop.interfaceThis code element defines ayieldstatement.Methods in spoon.reflect.code with type parameters of type CtStatementModifier 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.Methods in spoon.reflect.code that return CtStatementModifier and TypeMethodDescriptionCtStatement.clone()CtBodyHolder.getBody()Gets the body of this elementCtLoop.getBody()Gets the body of this loop.CtLabelledFlowBreak.getLabelledStatement()Methods in spoon.reflect.code that return types with arguments of type CtStatementModifier and TypeMethodDescriptionCtFor.getForInit()Gets the init statements.CtFor.getForUpdate()Gets the update statements.CtStatementList.getStatements()Returns the statement list.Methods in spoon.reflect.code with parameters of type CtStatementModifier 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.booleanCtFor.removeForInit(CtStatement statement)Removes an init statement.booleanCtFor.removeForUpdate(CtStatement statement)Removes an update statement.voidCtStatementList.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 CtStatementModifier 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
Subinterfaces of CtStatement in spoon.reflect.declarationModifier and TypeInterfaceDescriptioninterfaceCtClass<T>This element represents a class declaration.interfaceThis element represents an enumeration declaration.interfaceCtInterface<T>This element defines an interface declaration.interfaceThis element represents a record declaration.Methods in spoon.reflect.declaration with type parameters of type CtStatementMethods in spoon.reflect.declaration with parameters of type CtStatementModifier and TypeMethodDescription<T1 extends CtBodyHolder>
T1CtAnnotationMethod.setBody(CtStatement body) - 
Uses of CtStatement in spoon.reflect.factory
Methods in spoon.reflect.factory with type parameters of type CtStatementModifier 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
Methods in spoon.reflect.visitor with parameters of type CtStatementModifier and TypeMethodDescriptionprotected voidDefaultJavaPrettyPrinter.enterCtStatement(CtStatement s)Enters a statement.protected voidDefaultJavaPrettyPrinter.exitCtStatement(CtStatement statement)Exits a statement.booleanPrintingContext.isStatement(CtStatement stmt)voidCtInheritanceScanner.scanCtStatement(CtStatement s)Scans an abstract statement.<T extends PrintingContext.Writable>
TPrintingContext.Writable.setStatement(CtStatement stmt)There are statements (e.g.voidElementPrinterHelper.writeIfOrLoopBlock(CtStatement block)write all non-implicit parts of a block, with special care for indentationvoidElementPrinterHelper.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 - 
Uses of CtStatement in spoon.support.compiler
Methods in spoon.support.compiler that return CtStatementModifier and TypeMethodDescriptionstatic CtStatementSnippetCompilationHelper.compileStatement(CtCodeSnippetStatement st)static CtStatementSnippetCompilationHelper.compileStatement(CtCodeSnippetStatement st, CtTypeReference returnType) - 
Uses of CtStatement in spoon.support.reflect.code
Classes in spoon.support.reflect.code that implement CtStatementModifier and TypeClassDescriptionclassCtAssertImpl<T>classCtAssignmentImpl<T,A extends T>classCtBlockImpl<R>classclassCtCaseImpl<E>classclassclassclassclassclassclassclassclassclassclassclassclassclassCtOperatorAssignmentImpl<T,A extends T>classCtReturnImpl<R>classclassCtSwitchImpl<S>classclassclassclassclassclassclassCtYieldStatementImplMethods in spoon.support.reflect.code with type parameters of type CtStatementModifier 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>
CMethods in spoon.support.reflect.code that return CtStatementModifier and TypeMethodDescriptionCtStatementImpl.clone()CtLoopImpl.getBody()CtBreakImpl.getLabelledStatement()CtContinueImpl.getLabelledStatement()Methods in spoon.support.reflect.code that return types with arguments of type CtStatementModifier and TypeMethodDescriptionCtForImpl.getForInit()CtForImpl.getForUpdate()CtBlockImpl.getStatements()CtCaseImpl.getStatements()CtStatementListImpl.getStatements()CtBlockImpl.iterator()CtCaseImpl.iterator()CtStatementListImpl.iterator()Methods in spoon.support.reflect.code with parameters of type CtStatementModifier 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 voidCtStatementImpl.insertAfter(CtStatement target, CtStatement statement)static voidCtStatementImpl.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 voidCtStatementImpl.insertBefore(CtStatement target, CtStatement statement)insert `statement` just before targetstatic voidCtStatementImpl.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)booleanCtForImpl.removeForInit(CtStatement statement)booleanCtForImpl.removeForUpdate(CtStatement statement)voidCtBlockImpl.removeStatement(CtStatement statement)voidCtCaseImpl.removeStatement(CtStatement statement)voidCtStatementListImpl.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 CtStatementModifier 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
Classes in spoon.support.reflect.declaration that implement CtStatementModifier and TypeClassDescriptionclassCtClassImpl<T>The implementation forCtClass.classCtEnumImpl<T extends Enum<?>>classclassMethods in spoon.support.reflect.declaration with type parameters of type CtStatementModifier 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>
CMethods in spoon.support.reflect.declaration with parameters of type CtStatementModifier 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
Methods in spoon.support.visitor.clone with parameters of type CtStatementModifier and TypeMethodDescriptionvoidCloneBuilder.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 - 
Uses of CtStatement in spoon.template
Methods in spoon.template that return CtStatementModifier and TypeMethodDescriptionstatic CtStatementSubstitution.substituteStatement(CtClass<?> targetClass, Template<?> template, int statementIndex, String executableName, CtTypeReference<?>... parameterTypes)Gets a statement from a template executable with all the template parameters substituted.