org.ashikunep.irenka.toolkit
インタフェース ElementFactory

すべてのスーパーインタフェース:
Tool

public interface ElementFactory
extends Tool

CtElementを生成するファクトリ。 CtReference, CtLiteralはここでは生成しない。

バージョン:
$Date: 2008-02-12 12:35:47 +0900 (火, 12 2月 2008) $
作成者:
Suguru ARAKAWA (Gluegent, Inc.)

メソッドの概要
 ElementFactory borrow()
          このツールを借りる。
<A extends Annotation>
CtAnnotationInstance<A>
newAnnotationInstance()
          CtAnnotationInstanceを新しく生成して返す。
<A extends Annotation>
CtAnnotationInstance<A>
newAnnotationInstance(CtAnnotation<A> spec)
          CtAnnotationInstanceを新しく生成して返す。
<T> CtAnnotationInstanceElement<T>
newAnnotationInstanceElement()
          CtAnnotationInstanceElementを新しく生成して返す。
<T> CtAnnotationInstanceElement<T>
newAnnotationInstanceElement(CtAnnotationElement<T> spec, CtExpression<T> constant)
          CtAnnotationInstanceElementを新しく生成して返す。
<C> CtArrayAccess<C>
newArrayAccess()
          CtArrayAccessを新しく生成して返す。
<C> CtArrayAccess<C>
newArrayAccess(CtExpression<C[]> array, CtExpression<Integer> index)
          CtArrayAccessを新しく生成して返す。
 CtArrayLength newArrayLength()
          CtArrayLengthを新しく生成して返す。
<C> CtArrayLength
newArrayLength(CtExpression<C[]> array)
          CtArrayLengthを新しく生成して返す。
 CtAssert newAssert()
          CtAssertを新しく生成して返す。
 CtAssert newAssert(CtExpression<Boolean> assertion)
          CtAssertを新しく生成して返す。
<L,R extends L>
CtAssignment<L,R>
newAssignment()
          CtAssignmentを新しく生成して返す。
<L,R extends L>
CtAssignment<L,R>
newAssignment(CtAssignable<L> left, CtExpression<R> right)
          CtAssignmentを新しく生成して返す。
 CtBlock newBlock()
          CtBlockを新しく生成して返す。
 CtBreak newBreak()
          CtBreakを新しく生成して返す。
<S> CtCase<S>
newCase()
          CtCaseを新しく生成して返す。
<S> CtCase<S>
newCase(CtExpression<S> expression)
          CtCaseを新しく生成して返す。
<T> CtCast<T>
newCast()
          CtCastを新しく生成して返す。
<T> CtCast<T>
newCast(CtType<T> type, CtExpression<?> expression)
          CtCastを新しく生成して返す。
<T extends Throwable>
CtCatch<T>
newCatch()
          CtCatchを新しく生成して返す。
<T extends Throwable>
CtCatch<T>
newCatch(CtLocalVariable<T> formal)
          CtCatchを新しく生成して返す。
<T> CtConditional<T>
newConditional()
          CtConditionalを新しく生成して返す。
 CtConditional<?> newConditional(CtExpression<Boolean> condition, CtExpression<?> thenExpr, CtExpression<?> elseExpr)
          CtConditionalを新しく生成して返す。
<T> CtConstructorInvocation<T>
newConstructorInvocation()
          CtConstructorInvocationを新しく生成して返す。
<T> CtConstructorInvocation<T>
newConstructorInvocation(CtConstructor<T> spec)
          CtConstructorInvocationを新しく生成して返す。
 CtContinue newContinue()
          CtContinueを新しく生成して返す。
 CtDo newDo()
          CtDoを新しく生成して返す。
 CtDo newDo(CtStatement body, CtExpression<Boolean> condition)
          CtDoを新しく生成して返す。
 CtEmptyStatement newEmptyStatement()
          CtEmptyStatementを新しく生成して返す。
 CtForEach newEnhancedFor()
          CtForEachを新しく生成して返す。
 CtForEach newEnhancedFor(CtLocalVariable<?> variable, CtExpression<?> iterable, CtStatement body)
          CtForEachを新しく生成して返す。
 CtFor newFor()
          CtForを新しく生成して返す。
 CtFor newFor(CtStatement init, CtExpression<Boolean> condition, CtStatement update, CtStatement body)
          CtForを新しく生成して返す。
 CtIf newIf()
          CtIfを新しく生成して返す。
 CtIf newIf(CtExpression<Boolean> condition, CtStatement thenStmt)
          CtIfを新しく生成して返す。
 CtIf newIf(CtExpression<Boolean> condition, CtStatement thenStmt, CtStatement elseStmt)
          CtIfを新しく生成して返す。
<T> CtInfix<T>
newInfix()
          CtInfixを新しく生成して返す。
 CtInfix<?> newInfix(CtExpression<?> left, InfixOperator op, CtExpression<?> right)
          算術論理演算+, -, *, /, %, &, |, ^, &&, ||を表すCtInfixを新しく生成して返す。
 CtInstanceof newInstanceof()
          CtInstanceofを新しく生成して返す。
 CtInstanceof newInstanceof(CtExpression<?> object, CtType<?> type)
          CtInstanceofを新しく生成して返す。
 CtLabel newLabel(String name)
          CtLabelを新しく生成して返す。
<T> CtLocalVariable<T>
newLocalVariable(CtType<T> type, String name)
          CtLocalVariableを新しく生成して返す。
<T> CtMethodInvocation<T>
newMethodInvocation()
          CtMethodInvocationを新しく生成して返す。
<T> CtMethodInvocation<T>
newMethodInvocation(CtMethod<T> spec)
          CtMethodInvocationを新しく生成して返す。
 CtModifier newModifier()
          修飾子を新しく生成して返す。
 CtModifier newModifier(ModifierKind kind)
          修飾子を新しく生成して返す。
<C> CtNewArray<C>
newNewArray()
          CtNewArrayを新しく生成して返す。
<C> CtNewArray<C>
newNewArray(CtArray<C> spec)
          CtNewArrayを新しく生成して返す。
<C> CtNewArray<C>
newNewArrayWithDimensions(CtArray<C> spec, List<? extends CtExpression<Integer>> dimensions)
          CtNewArrayを新しく生成して返す。
<C> CtNewArray<C>
newNewArrayWithInitialElements(CtArray<C> spec, List<? extends CtExpression<? extends C>> initializer)
          CtNewArrayを新しく生成して返す。
<T> CtNewInstance<T>
newNewInstance()
          CtNewInstanceを新しく生成して返す。
<T> CtNewInstance<T>
newNewInstance(CtConstructor<T> spec)
          CtNewInstanceを新しく生成して返す。
<T> CtParameter<T>
newParameter(CtType<T> type, String name)
          CtParameterを新しく生成して返す。
 CtUnary<?> newPostfix(CtExpression<?> operand, UnaryOperator operator)
          CtUnaryを新しく生成して返す。
 CtUnary<?> newPrefix(UnaryOperator operator, CtExpression<?> operand)
          CtUnaryを新しく生成して返す。
<T> CtReturn<T>
newReturn()
          CtReturnを新しく生成して返す。
<T> CtReturn<T>
newReturn(CtExpression<T> result)
          CtReturnを新しく生成して返す。
<S> CtSwitch<S>
newSwitch()
          CtSwitchを新しく生成して返す。
<S> CtSwitch<S>
newSwitch(CtExpression<S> selector)
          CtSwitchを新しく生成して返す。
 CtSynchronized newSynchronized()
          CtSynchronizedを新しく生成して返す。
 CtSynchronized newSynchronized(CtExpression<?> lock)
          CtSynchronizedを新しく生成して返す。
 CtThrow newThrow()
          CtThrowを新しく生成して返す。
 CtThrow newThrow(CtExpression<? extends Throwable> thrown)
          CtThrowを新しく生成して返す。
 CtTry newTry()
          CtTryを新しく生成して返す。
 CtTypeParameter<?> newTypeParameter(String name)
          CtTypeParameterを新しく生成して返す。
<B> CtTypeParameter<? extends B>
newTypeParameter(String name, CtType<B> primaryBound)
          CtTypeParameterを新しく生成して返す。
 CtTypeParameter<?> newTypeParameter(String name, List<? extends CtType<?>> bounds)
          CtTypeParameterを新しく生成して返す。
<T> CtUnary<T>
newUnary()
          CtUnaryを新しく生成して返す。
<T> CtVariableAccess<T>
newVariableAccess()
          CtVariableAccessを新しく生成して返す。
<T> CtVariableAccess<T>
newVariableAccess(CtExpression<?> object, CtField<T> field)
          CtVariableAccessを新しく生成して返す。
<T> CtVariableAccess<T>
newVariableAccess(CtVariable<T> variable)
          CtVariableAccessを新しく生成して返す。
 CtWhile newWhile()
          CtWhileを新しく生成して返す。
 CtWhile newWhile(CtExpression<Boolean> condition, CtStatement body)
          CtWhileを新しく生成して返す。
 

メソッドの詳細

newArrayAccess

<C> CtArrayAccess<C> newArrayAccess()
CtArrayAccessを新しく生成して返す。

型パラメータ:
C - 参照する配列の要素型
戻り値:
対応するノード

newArrayAccess

<C> CtArrayAccess<C> newArrayAccess(CtExpression<C[]> array,
                                    CtExpression<Integer> index)
CtArrayAccessを新しく生成して返す。

型パラメータ:
C - 参照する配列の要素型
パラメータ:
array - 参照される配列
index - 配列の添え字
戻り値:
対応するノード

newArrayLength

CtArrayLength newArrayLength()
CtArrayLengthを新しく生成して返す。

戻り値:
対応するノード

newArrayLength

<C> CtArrayLength newArrayLength(CtExpression<C[]> array)
CtArrayLengthを新しく生成して返す。

型パラメータ:
C - 参照する配列の要素型
パラメータ:
array - 参照される配列
戻り値:
対応するノード

newAssert

CtAssert newAssert()
CtAssertを新しく生成して返す。

戻り値:
対応するノード

newAssert

CtAssert newAssert(CtExpression<Boolean> assertion)
CtAssertを新しく生成して返す。

パラメータ:
assertion - 表明式
戻り値:
対応するノード

newAssignment

<L,R extends L> CtAssignment<L,R> newAssignment()
CtAssignmentを新しく生成して返す。

型パラメータ:
L - 左辺の型
R - 右辺の型
戻り値:
対応するノード

newAssignment

<L,R extends L> CtAssignment<L,R> newAssignment(CtAssignable<L> left,
                                                CtExpression<R> right)
CtAssignmentを新しく生成して返す。

型パラメータ:
L - 左辺の型
R - 右辺の型
パラメータ:
left - 左辺式
right - 右辺式
戻り値:
対応するノード

newBlock

CtBlock newBlock()
CtBlockを新しく生成して返す。

戻り値:
対応するノード

newBreak

CtBreak newBreak()
CtBreakを新しく生成して返す。

戻り値:
対応するノード

newCase

<S> CtCase<S> newCase()
CtCaseを新しく生成して返す。

型パラメータ:
S - switch文のセレクタが持つ型
戻り値:
対応するノード

newCase

<S> CtCase<S> newCase(CtExpression<S> expression)
CtCaseを新しく生成して返す。

型パラメータ:
S - switch文のセレクタが持つ型
パラメータ:
expression - case
戻り値:
対応するノード

newCast

<T> CtCast<T> newCast()
CtCastを新しく生成して返す。

型パラメータ:
T - キャスト先の型
戻り値:
対応するノード

newCast

<T> CtCast<T> newCast(CtType<T> type,
                      CtExpression<?> expression)
CtCastを新しく生成して返す。

型パラメータ:
T - キャスト先の型
パラメータ:
type - キャスト先の型
expression - キャスト対象の式
戻り値:
対応するノード

newCatch

<T extends Throwable> CtCatch<T> newCatch()
CtCatchを新しく生成して返す。

型パラメータ:
T - スローする例外の型
戻り値:
対応するノード

newCatch

<T extends Throwable> CtCatch<T> newCatch(CtLocalVariable<T> formal)
CtCatchを新しく生成して返す。

型パラメータ:
T - スローする例外の型
パラメータ:
formal - キャッチする例外引数
戻り値:
対応するノード

newConditional

<T> CtConditional<T> newConditional()
CtConditionalを新しく生成して返す。

型パラメータ:
T - 第二項および第三項の型
戻り値:
対応するノード

newConditional

CtConditional<?> newConditional(CtExpression<Boolean> condition,
                                CtExpression<?> thenExpr,
                                CtExpression<?> elseExpr)
CtConditionalを新しく生成して返す。

パラメータ:
condition - 条件式
thenExpr - 成立時に評価される式
elseExpr - 不成立時に評価される式
戻り値:
対応するノード

newConstructorInvocation

<T> CtConstructorInvocation<T> newConstructorInvocation()
CtConstructorInvocationを新しく生成して返す。

型パラメータ:
T - 呼び出すコンストラクタを宣言するクラス
戻り値:
対応するノード

newConstructorInvocation

<T> CtConstructorInvocation<T> newConstructorInvocation(CtConstructor<T> spec)
CtConstructorInvocationを新しく生成して返す。

型パラメータ:
T - 呼び出すコンストラクタを宣言するクラス
パラメータ:
spec - 起動するコンストラクタ
戻り値:
対応するノード

newContinue

CtContinue newContinue()
CtContinueを新しく生成して返す。

戻り値:
対応するノード

newDo

CtDo newDo()
CtDoを新しく生成して返す。

戻り値:
対応するノード

newDo

CtDo newDo(CtStatement body,
           CtExpression<Boolean> condition)
CtDoを新しく生成して返す。

パラメータ:
body - ループ本体
condition - 条件式
戻り値:
対応するノード

newEmptyStatement

CtEmptyStatement newEmptyStatement()
CtEmptyStatementを新しく生成して返す。

戻り値:
対応するノード

newEnhancedFor

CtForEach newEnhancedFor()
CtForEachを新しく生成して返す。

戻り値:
対応するノード

newEnhancedFor

CtForEach newEnhancedFor(CtLocalVariable<?> variable,
                         CtExpression<?> iterable,
                         CtStatement body)
CtForEachを新しく生成して返す。

パラメータ:
variable - ループ変数
iterable - 繰り返す要素
body - ループ本体
戻り値:
対応するノード

newFor

CtFor newFor()
CtForを新しく生成して返す。

戻り値:
対応するノード

newFor

CtFor newFor(CtStatement init,
             CtExpression<Boolean> condition,
             CtStatement update,
             CtStatement body)
CtForを新しく生成して返す。

パラメータ:
init - 初期化文
condition - 条件文
update - 更新文
body - ループ本体
戻り値:
対応するノード

newThrow

CtThrow newThrow()
CtThrowを新しく生成して返す。

戻り値:
対応するノード

newThrow

CtThrow newThrow(CtExpression<? extends Throwable> thrown)
CtThrowを新しく生成して返す。

パラメータ:
thrown - スローされるべき例外の式
戻り値:
対応するノード

newIf

CtIf newIf()
CtIfを新しく生成して返す。

戻り値:
対応するノード

newIf

CtIf newIf(CtExpression<Boolean> condition,
           CtStatement thenStmt)
CtIfを新しく生成して返す。

パラメータ:
condition - 条件式
thenStmt - 成立時に実行される文
戻り値:
対応するノード

newIf

CtIf newIf(CtExpression<Boolean> condition,
           CtStatement thenStmt,
           CtStatement elseStmt)
CtIfを新しく生成して返す。

パラメータ:
condition - 条件式
thenStmt - 成立時に実行される文
elseStmt - 不成立時に実行される文
戻り値:
対応するノード

newInfix

<T> CtInfix<T> newInfix()
CtInfixを新しく生成して返す。

型パラメータ:
T - この式を評価した際の型
戻り値:
対応するノード

newInfix

CtInfix<?> newInfix(CtExpression<?> left,
                    InfixOperator op,
                    CtExpression<?> right)
算術論理演算+, -, *, /, %, &, |, ^, &&, ||を表すCtInfixを新しく生成して返す。

パラメータ:
left - 第一演算数
op - 演算子
right - 第二演算数
戻り値:
対応するノード

newInstanceof

CtInstanceof newInstanceof()
CtInstanceofを新しく生成して返す。

戻り値:
対応するノード

newInstanceof

CtInstanceof newInstanceof(CtExpression<?> object,
                           CtType<?> type)
CtInstanceofを新しく生成して返す。

パラメータ:
object - 比較されるオブジェクト
type - 比較先の型
戻り値:
対応するノード

newMethodInvocation

<T> CtMethodInvocation<T> newMethodInvocation()
CtMethodInvocationを新しく生成して返す。

型パラメータ:
T - この式を評価した際の型
戻り値:
対応するノード

newMethodInvocation

<T> CtMethodInvocation<T> newMethodInvocation(CtMethod<T> spec)
CtMethodInvocationを新しく生成して返す。

型パラメータ:
T - この式を評価した際の型
パラメータ:
spec - 起動されるメソッド
戻り値:
対応するノード

newNewArray

<C> CtNewArray<C> newNewArray()
CtNewArrayを新しく生成して返す。

型パラメータ:
C - 生成する配列の要素型
戻り値:
対応するノード

newNewArray

<C> CtNewArray<C> newNewArray(CtArray<C> spec)
CtNewArrayを新しく生成して返す。

型パラメータ:
C - 生成する配列の要素型
パラメータ:
spec - 生成される配列の型
戻り値:
対応するノード

newNewArrayWithDimensions

<C> CtNewArray<C> newNewArrayWithDimensions(CtArray<C> spec,
                                            List<? extends CtExpression<Integer>> dimensions)
CtNewArrayを新しく生成して返す。

型パラメータ:
C - 生成する配列の要素型
パラメータ:
spec - 生成される配列の型
dimensions - 各次元の要素数
戻り値:
対応するノード

newNewArrayWithInitialElements

<C> CtNewArray<C> newNewArrayWithInitialElements(CtArray<C> spec,
                                                 List<? extends CtExpression<? extends C>> initializer)
CtNewArrayを新しく生成して返す。

型パラメータ:
C - 生成する配列の要素型
パラメータ:
spec - 生成される配列の型
initializer - 各要素の初期値リスト
戻り値:
対応するノード

newNewInstance

<T> CtNewInstance<T> newNewInstance()
CtNewInstanceを新しく生成して返す。

型パラメータ:
T - 生成するインスタンスの型
戻り値:
対応するノード

newNewInstance

<T> CtNewInstance<T> newNewInstance(CtConstructor<T> spec)
CtNewInstanceを新しく生成して返す。

型パラメータ:
T - 生成するインスタンスの型
パラメータ:
spec - インスタンス生成時に起動されるコンストラクタ
戻り値:
対応するノード

newReturn

<T> CtReturn<T> newReturn()
CtReturnを新しく生成して返す。

型パラメータ:
T - 戻り値の型
戻り値:
対応するノード

newReturn

<T> CtReturn<T> newReturn(CtExpression<T> result)
CtReturnを新しく生成して返す。

型パラメータ:
T - 戻り値の型
パラメータ:
result - 結果を表す式
戻り値:
対応するノード

newTry

CtTry newTry()
CtTryを新しく生成して返す。

戻り値:
対応するノード

newSwitch

<S> CtSwitch<S> newSwitch()
CtSwitchを新しく生成して返す。

型パラメータ:
S - セレクタ式の型
戻り値:
対応するノード

newSwitch

<S> CtSwitch<S> newSwitch(CtExpression<S> selector)
CtSwitchを新しく生成して返す。

型パラメータ:
S - セレクタ式の型
パラメータ:
selector - セレクタ式
戻り値:
対応するノード

newSynchronized

CtSynchronized newSynchronized()
CtSynchronizedを新しく生成して返す。

戻り値:
対応するノード

newSynchronized

CtSynchronized newSynchronized(CtExpression<?> lock)
CtSynchronizedを新しく生成して返す。

パラメータ:
lock - ロックオブジェクト
戻り値:
対応するノード

newUnary

<T> CtUnary<T> newUnary()
CtUnaryを新しく生成して返す。

型パラメータ:
T - この式を評価した際の型
戻り値:
対応するノード

newPrefix

CtUnary<?> newPrefix(UnaryOperator operator,
                     CtExpression<?> operand)
CtUnaryを新しく生成して返す。

パラメータ:
operator - 前置演算子
operand - 演算数
戻り値:
対応するノード

newPostfix

CtUnary<?> newPostfix(CtExpression<?> operand,
                      UnaryOperator operator)
CtUnaryを新しく生成して返す。

パラメータ:
operator - 後置演算子
operand - 演算数
戻り値:
対応するノード

newVariableAccess

<T> CtVariableAccess<T> newVariableAccess()
CtVariableAccessを新しく生成して返す。

型パラメータ:
T - この式を評価した際の型
戻り値:
対応するノード

newVariableAccess

<T> CtVariableAccess<T> newVariableAccess(CtVariable<T> variable)
CtVariableAccessを新しく生成して返す。

型パラメータ:
T - この式を評価した際の型
パラメータ:
variable - 参照する変数
戻り値:
対応するノード

newVariableAccess

<T> CtVariableAccess<T> newVariableAccess(CtExpression<?> object,
                                          CtField<T> field)
CtVariableAccessを新しく生成して返す。

型パラメータ:
T - この式を評価した際の型
パラメータ:
object - フィールドを保持する式
field - 参照するフィールド
戻り値:
対応するノード

newWhile

CtWhile newWhile()
CtWhileを新しく生成して返す。

戻り値:
対応するノード

newWhile

CtWhile newWhile(CtExpression<Boolean> condition,
                 CtStatement body)
CtWhileを新しく生成して返す。

パラメータ:
condition - 条件式
body - ループ本体
戻り値:
対応するノード

newAnnotationInstance

<A extends Annotation> CtAnnotationInstance<A> newAnnotationInstance()
CtAnnotationInstanceを新しく生成して返す。

型パラメータ:
A - 注釈の型
戻り値:
注釈

newAnnotationInstance

<A extends Annotation> CtAnnotationInstance<A> newAnnotationInstance(CtAnnotation<A> spec)
CtAnnotationInstanceを新しく生成して返す。

型パラメータ:
A - 注釈の型
パラメータ:
spec - 注釈の宣言
戻り値:
注釈

newAnnotationInstanceElement

<T> CtAnnotationInstanceElement<T> newAnnotationInstanceElement()
CtAnnotationInstanceElementを新しく生成して返す。

型パラメータ:
T - 要素の型
戻り値:
対応するノード

newAnnotationInstanceElement

<T> CtAnnotationInstanceElement<T> newAnnotationInstanceElement(CtAnnotationElement<T> spec,
                                                                CtExpression<T> constant)
CtAnnotationInstanceElementを新しく生成して返す。

型パラメータ:
T - 要素の型
パラメータ:
spec - 注釈要素
constant - 注釈要素の値
戻り値:
対応するノード

newModifier

CtModifier newModifier()
修飾子を新しく生成して返す。

戻り値:
対応する修飾子

newModifier

CtModifier newModifier(ModifierKind kind)
修飾子を新しく生成して返す。

パラメータ:
kind - 修飾子の種類
戻り値:
対応する修飾子

newLabel

CtLabel newLabel(String name)
CtLabelを新しく生成して返す。

パラメータ:
name - ラベルの名称
戻り値:
対応するラベルの宣言

newParameter

<T> CtParameter<T> newParameter(CtType<T> type,
                                String name)
CtParameterを新しく生成して返す。

型パラメータ:
T - 変数の型
パラメータ:
type - 引数の型
name - 引数の名称
戻り値:
対応する引数の宣言

newLocalVariable

<T> CtLocalVariable<T> newLocalVariable(CtType<T> type,
                                        String name)
CtLocalVariableを新しく生成して返す。

型パラメータ:
T - 変数の型
パラメータ:
type - 変数の型
name - 変数の名称
戻り値:
対応する変数の宣言

newTypeParameter

CtTypeParameter<?> newTypeParameter(String name)
CtTypeParameterを新しく生成して返す。

パラメータ:
name - 型引数の名称
戻り値:
対応する型引数の宣言

newTypeParameter

<B> CtTypeParameter<? extends B> newTypeParameter(String name,
                                                  CtType<B> primaryBound)
CtTypeParameterを新しく生成して返す。

型パラメータ:
B - 境界の型
パラメータ:
name - 型引数の名称
primaryBound - 境界宣言
戻り値:
対応する型引数の宣言

newTypeParameter

CtTypeParameter<?> newTypeParameter(String name,
                                    List<? extends CtType<?>> bounds)
CtTypeParameterを新しく生成して返す。

パラメータ:
name - 型引数の名称
bounds - 型境界リスト
戻り値:
対応する型引数の宣言

borrow

ElementFactory borrow()
インタフェース Tool の記述:
このツールを借りる。

定義:
インタフェース Tool 内の borrow
戻り値:
借りるツール


Copyright 2007 the Seasar Foundation and the Others.