@Beta public interface MutableFieldDeclaration extends MutableMemberDeclaration, FieldDeclaration
| Modifier and Type | Method and Description | 
|---|---|
void | 
markAsInitializedBy(ConstructorDeclaration constructorDeclaration)
Indicate that this field is properly initialized by the given constructor. 
 | 
void | 
setFinal(boolean isFinal)
sets the 'final' property 
 | 
void | 
setInitializer(CompilationStrategy initializer)
sets the 'initializer' expression of this field declaration. 
 | 
void | 
setInitializer(Expression initializer)
sets the 'initializer' expression of this field declaration. 
 | 
void | 
setInitializer(StringConcatenationClient template)
sets the 'initializer' expression of this field declaration. 
 | 
void | 
setStatic(boolean isStatic)
sets the 'static' property 
 | 
void | 
setTransient(boolean isTransient)
sets the 'transient' property 
 | 
void | 
setType(TypeReference type)
sets the 'type' of this field declaration 
 | 
void | 
setVolatile(boolean isVolatile)
sets the 'volatile' property 
 | 
getDeclaringType, setDeprecated, setDocComment, setVisibilitymarkAsReadaddAnnotation, removeAnnotationsetSimpleNameremovegetInitializer, getType, isFinal, isStatic, isTransient, isVolatilegetDocComment, getModifiers, getVisibility, isDeprecatedfindAnnotation, getAnnotationsgetCompilationUnit, getSimpleNamevoid setFinal(boolean isFinal)
isFinal - void setStatic(boolean isStatic)
isStatic - void setTransient(boolean isTransient)
isTransient - void setVolatile(boolean isVolatile)
isVolatile - void setInitializer(Expression initializer)
MutableExecutableDeclaration or MutableFieldDeclaration, it
  will be detached from there as well.initializer - void setInitializer(CompilationStrategy initializer)
CompilationStrategy will be executed later during code generation, not immediately.initializer - the compilation strategy, must not be nulljava.lang.IllegalArgumentException - if the initializer is nullvoid setInitializer(StringConcatenationClient template)
StringConcatenationClient will be executed later during code generation, not immediately.template - the compilation template, must not be nulljava.lang.IllegalArgumentException - if the initializer is nullvoid markAsInitializedBy(ConstructorDeclaration constructorDeclaration)
constructorDeclaration - a constructor that initializes this fieldvoid setType(TypeReference type)
type - the type, must be not nulljava.lang.IllegalArgumentException - if the type is nulll