public class GeneratedVariable extends AbstractExpression implements Declaration, AssignmentTarget, Annotable
Modifier and Type | Method and Description |
---|---|
GeneratedAnnotationUse |
annotate(Class<? extends Annotation> clazz)
Adds an annotation to this variable.
|
GeneratedAnnotationUse |
annotate(TypeReference clazz)
Adds an annotation to this variable.
|
<W extends AnnotationWriter> |
annotate2(Class<W> clazz)
Adds an annotation to this program element
and returns a type-safe writer to fill in the values of such annotations.
|
Collection<GeneratedAnnotationUse> |
annotations()
Read-only live view of all annotations on this
Annotable |
GeneratedExpression |
assign(GeneratedExpression rhs) |
GeneratedExpression |
assignPlus(GeneratedExpression rhs) |
void |
bind(Formatter f) |
void |
declare(Formatter f) |
void |
generate(Formatter f) |
GeneratedVariable |
init(GeneratedExpression init)
Initialize this variable
|
protected boolean |
isAnnotated() |
Modifiers |
mods() |
String |
name()
Get the name of this variable
|
void |
name(String name)
Changes the name of this variable.
|
Type |
type()
Return the type of this variable.
|
Type |
type(Type newType)
Sets the type of this variable.
|
_instanceof, band, bor, cand, complement, component, cor, decr, div, eq, gt, gte, incr, invoke, invoke, isNotNull, isNull, lt, lte, minus, minus, mod, mul, ne, not, plus, ref, ref, shl, shr, shrz, xor
public GeneratedVariable init(GeneratedExpression init)
init
- Expression to be used to initialize this fieldpublic String name()
public void name(String name)
public Type type()
public Modifiers mods()
public Type type(Type newType)
newType
- must not be null.public GeneratedAnnotationUse annotate(TypeReference clazz)
public GeneratedAnnotationUse annotate(Class<? extends Annotation> clazz)
public <W extends AnnotationWriter> W annotate2(Class<W> clazz)
Annotable
public Collection<GeneratedAnnotationUse> annotations()
Annotable
Annotable
annotations
in interface Annotable
protected boolean isAnnotated()
public void bind(Formatter f)
public void declare(Formatter f)
declare
in interface Declaration
public GeneratedExpression assign(GeneratedExpression rhs)
assign
in interface AssignmentTarget
public GeneratedExpression assignPlus(GeneratedExpression rhs)
assignPlus
in interface AssignmentTarget
Copyright © 2010–2015 MuleSoft, Inc.. All rights reserved.