Top Methods
org.eclipse.xtend.lib.macro.declaration

public Interface MutableFieldDeclaration

extends MutableMemberDeclaration, FieldDeclaration
Annotations
@Beta
Imports
org.eclipse.xtend.lib.macro.expression.Expression, org.eclipse.xtend2.lib.StringConcatenationClient, com.google.common.annotations.Beta

Author
Sven Efftinge

Method Summary

Modifier and TypeMethod and Description
public void
markAsInitializedBy(ConstructorDeclaration
a constructor that initializes this field
constructorDeclaration
)

Indicate that this field is properly initialized by the given constructor.

public void
setConstantValueAsBoolean(boolean
the constant value
value
)

sets the 'constant' value of this field.

public void
setConstantValueAsByte(byte
the constant value
value
)

sets the 'constant' value of this field.

public void
setConstantValueAsChar(char
the constant value
value
)

sets the 'constant' value of this field.

public void
setConstantValueAsDouble(double
the constant value
value
)

sets the 'constant' value of this field.

public void
setConstantValueAsFloat(float
the constant value
value
)

sets the 'constant' value of this field.

public void
setConstantValueAsInt(int
the constant value
value
)

sets the 'constant' value of this field.

public void
setConstantValueAsLong(long
the constant value
value
)

sets the 'constant' value of this field.

public void
setConstantValueAsShort(short
the constant value
value
)

sets the 'constant' value of this field.

public void
setConstantValueAsString(String
the constant value, must not be null
value
)

sets the 'constant' value of this field.

public void
setFinal(boolean isFinal)

sets the 'final' property

public void
setInitializer(Expression initializer)

sets the 'initializer' expression of this field declaration.

public void
setInitializer(CompilationStrategy
the compilation strategy, must not be null
initializer
)

sets the 'initializer' expression of this field declaration.

public void
setInitializer(StringConcatenationClient
the compilation template, must not be null
template
)

sets the 'initializer' expression of this field declaration.

public void
setStatic(boolean isStatic)

sets the 'static' property

public void
setTransient(boolean isTransient)

sets the 'transient' property

public void
setType(TypeReference
the type, must be not null
type
)

sets the 'type' of this field declaration

public void
setVolatile(boolean isVolatile)

sets the 'volatile' property

Inherited from org.eclipse.xtend.lib.macro.declaration.FieldDeclaration:
getInitializergetTypeisFinalisStaticisTransientisVolatile
Inherited from org.eclipse.xtend.lib.macro.declaration.MutableMemberDeclaration:
getDeclaringTypesetDeprecatedsetDocCommentsetVisibility

Method Detail

markAsInitializedByback to summary
public void markAsInitializedBy(ConstructorDeclaration constructorDeclaration)

Indicate that this field is properly initialized by the given constructor.

Parameters
constructorDeclaration:ConstructorDeclaration

a constructor that initializes this field

Since
2.7
setConstantValueAsBooleanback to summary
public void setConstantValueAsBoolean(boolean value)

sets the 'constant' value of this field. Automatically detaches any previously assigned initializers from this field declaration. Also marks this field as 'static' and 'final'

Parameters
value:boolean

the constant value

Since
2.8
setConstantValueAsByteback to summary
public void setConstantValueAsByte(byte value)

sets the 'constant' value of this field. Automatically detaches any previously assigned initializers from this field declaration. Also marks this field as 'static' and 'final'

Parameters
value:byte

the constant value

Since
2.8
setConstantValueAsCharback to summary
public void setConstantValueAsChar(char value)

sets the 'constant' value of this field. Automatically detaches any previously assigned initializers from this field declaration. Also marks this field as 'static' and 'final'

Parameters
value:char

the constant value

Since
2.8
setConstantValueAsDoubleback to summary
public void setConstantValueAsDouble(double value)

sets the 'constant' value of this field. Automatically detaches any previously assigned initializers from this field declaration. Also marks this field as 'static' and 'final'

Parameters
value:double

the constant value

Since
2.8
setConstantValueAsFloatback to summary
public void setConstantValueAsFloat(float value)

sets the 'constant' value of this field. Automatically detaches any previously assigned initializers from this field declaration. Also marks this field as 'static' and 'final'

Parameters
value:float

the constant value

Since
2.8
setConstantValueAsIntback to summary
public void setConstantValueAsInt(int value)

sets the 'constant' value of this field. Automatically detaches any previously assigned initializers from this field declaration. Also marks this field as 'static' and 'final'

Parameters
value:int

the constant value

Since
2.8
setConstantValueAsLongback to summary
public void setConstantValueAsLong(long value)

sets the 'constant' value of this field. Automatically detaches any previously assigned initializers from this field declaration. Also marks this field as 'static' and 'final'

Parameters
value:long

the constant value

Since
2.8
setConstantValueAsShortback to summary
public void setConstantValueAsShort(short value)

sets the 'constant' value of this field. Automatically detaches any previously assigned initializers from this field declaration. Also marks this field as 'static' and 'final'

Parameters
value:short

the constant value

Since
2.8
setConstantValueAsStringback to summary
public void setConstantValueAsString(String value)

sets the 'constant' value of this field. Automatically detaches any previously assigned initializers from this field declaration. Also marks this field as 'static' and 'final'

Parameters
value:String

the constant value, must not be null

Exceptions
IllegalArgumentException:
if the value is null
Since
2.8
setFinalback to summary
public void setFinal(boolean isFinal)

sets the 'final' property

setInitializerback to summary
public void setInitializer(Expression initializer)

sets the 'initializer' expression of this field declaration. Automatically detaches any previously assigned initializers from this field declaration. If the given expression is assigned to another MutableExecutableDeclaration or MutableFieldDeclaration, it will be detached from there as well.

setInitializerback to summary
public void setInitializer(CompilationStrategy initializer)

sets the 'initializer' expression of this field declaration. Automatically detaches any previously assigned initializers from this field declaration. The given CompilationStrategy will be executed later during code generation, not immediately.

Parameters
initializer:CompilationStrategy

the compilation strategy, must not be null

Exceptions
IllegalArgumentException:
if the initializer is null
setInitializerback to summary
public void setInitializer(StringConcatenationClient template)

sets the 'initializer' expression of this field declaration. Automatically detaches any previously assigned initializers from this field declaration. The given StringConcatenationClient will be executed later during code generation, not immediately.

Parameters
template:StringConcatenationClient

the compilation template, must not be null

Exceptions
IllegalArgumentException:
if the initializer is null
setStaticback to summary
public void setStatic(boolean isStatic)

sets the 'static' property

setTransientback to summary
public void setTransient(boolean isTransient)

sets the 'transient' property

setTypeback to summary
public void setType(TypeReference type)

sets the 'type' of this field declaration

Parameters
type:TypeReference

the type, must be not null

Exceptions
IllegalArgumentException:
if the type is nulll
setVolatileback to summary
public void setVolatile(boolean isVolatile)

sets the 'volatile' property