Method Summary |
|
public CtBinaryOperator<T> | createBinaryOperator(CtExpression> left, CtExpression> right, BinaryOperatorKind kind) Creates a binary operator. |
public CtFieldAccess<Class<T>> | createClassAccess(CtTypeReference<T> type) Creates a class access expression of the form C.class . |
public CtCodeSnippetExpression<T> | createCodeSnippetExpression(String expression) Creates a Code Snippet expression.
< Parameters: T - > The type of the expression represented by the CodeSnippet Parameters: expression - The string that contains the expression. |
public CtCodeSnippetStatement | createCodeSnippetStatement(String statement) Creates a Code Snippet statement.
Parameters: statement - The String containing the statement. |
public CtInvocation<T> | createInvocation(CtExpression> target, CtExecutableReference<T> executable, CtExpression>... arguments) Creates an invocation (can be a statement or an expression). |
public CtInvocation<T> | createInvocation(CtExpression> target, CtExecutableReference<T> executable, List<CtExpression<?>> arguments) Creates an invocation (can be a statement or an expression). |
public CtLiteral<T> | createLiteral(T value) Creates a literal with a given value. |
public CtNewArray<T[]> | createLiteralArray(T[] value) Creates a one-dimension array that must only contain literals. |
public CtLocalVariable<T> | createLocalVariable(CtTypeReference<T> type, String name, CtExpression<T> defaultExpression) Creates a local variable declaration. |
public CtLocalVariableReference<T> | createLocalVariableReference(CtLocalVariable<T> localVariable) Creates a local variable reference that points to an existing local
variable (strong referencing). |
public CtLocalVariableReference<T> | createLocalVariableReference(CtTypeReference<T> type, String name) Creates a local variable reference with its name an type (weak
referencing). |
public CtStatementList | createStatementList(CtBlock> block) Creates a new statement list from an existing block. |
public CtFieldAccess<T> | createThisAccess(CtTypeReference<T> type) Creates an access to a this variable (of the form
type.this ). |
public CtVariableAccess<T> | createVariableAccess(CtVariableReference<T> variable, boolean isStatic) Creates a variable access. |
public List<CtExpression<?>> | createVariableAccesses(List<? extends CtVariable<?>> variables) Creates a list of variable accesses. |
public CtAssignment<A, T> | createVariableAssignment(CtVariableReference<A> variable, boolean isStatic, CtExpression<T> expression) Creates a variable assignment (can be an expression or a statement). |
public CtStatementList | createVariableAssignments(List<? extends CtVariable> variables, List<? extends CtExpression> expressions) Creates a list of statements that contains the assignments of a set of
variables. |
public List<R> | getReferences(List<E> elements) Gets a list of references from a list of elements. |
public Set<ModifierKind> | modifiers(ModifierKind... modifiers) Creates a modifier set. |