public class JVar extends AbstractJExpressionAssignmentTargetImpl implements IJDeclaration, IJAnnotatable
| Constructor and Description |
|---|
JVar(JMods aMods,
AbstractJType aType,
String sName,
IJExpression aInitExpr)
JVar constructor
|
| Modifier and Type | Method and Description |
|---|---|
JAnnotationUse |
annotate(AbstractJClass clazz)
Adds an annotation to this variable.
|
JAnnotationUse |
annotate(Class<? extends Annotation> clazz)
Adds an annotation to this variable.
|
<W extends IJAnnotationWriter<?>> |
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<JAnnotationUse> |
annotations()
Read-only live view of all annotations on this
IJAnnotatable |
void |
bind(JFormatter f) |
void |
declare(JFormatter f) |
boolean |
equals(Object o) |
void |
generate(JFormatter f) |
int |
hashCode() |
IJExpression |
init() |
JVar |
init(IJExpression aInitExpr)
Initialize this variable
|
protected boolean |
isAnnotated() |
JMods |
mods() |
String |
name()
Get the name of this variable
|
void |
name(String sName)
Changes the name of this variable.
|
AbstractJType |
type()
Return the type of this variable.
|
AbstractJType |
type(AbstractJType aNewType)
Sets the type of this variable.
|
assign, assign, assign, assign, assign, assign, assign, assign, assignBand, assignBor, assignDivide, assignDivide, assignDivide, assignDivide, assignDivide, assignMinus, assignMinus, assignMinus, assignMinus, assignMinus, assignPlus, assignPlus, assignPlus, assignPlus, assignPlus, assignPlus, assignPlus, assignShl, assignShl, assignShr, assignShr, assignShrz, assignShrz, assignTimes, assignTimes, assignTimes, assignTimes, assignTimes, assignXor_instanceof, band, bor, cand, complement, component, component, component0, cor, decr, div, div, div, div, div, eq, eq0, eqNull, gt, gt0, gte, gte0, incr, invoke, invoke, lt, lt0, lte, lte0, minus, minus, minus, minus, minus, minus, mod, mul, mul, mul, mul, mul, ne, ne0, neNull, not, plus, plus, plus, plus, plus, plus, predecr, preincr, ref, ref, shl, shl, shr, shr, shrz, shrz, xorclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait_instanceof, band, bor, cand, complement, component, component, component0, cor, decr, div, div, div, div, div, eq, eq0, eqNull, gt, gt0, gte, gte0, incr, invoke, invoke, lt, lt0, lte, lte0, minus, minus, minus, minus, minus, minus, mod, mul, mul, mul, mul, mul, ne, ne0, neNull, not, plus, plus, plus, plus, plus, plus, predecr, preincr, ref, ref, shl, shl, shr, shr, shrz, shrz, xorpublic JVar(@Nonnull JMods aMods, @Nonnull AbstractJType aType, @Nonnull String sName, @Nullable IJExpression aInitExpr)
aMods - Modifiers to useaType - Datatype of this variablesName - Name of this variableaInitExpr - Value to initialize this variable to@Nonnull public JVar init(@Nullable IJExpression aInitExpr)
aInitExpr - Expression to be used to initialize this field@Nullable public IJExpression init()
null.public void name(@Nonnull String sName)
sName - New name of the variable@Nonnull public AbstractJType type()
@Nonnull public JMods mods()
@Nonnull public AbstractJType type(@Nonnull AbstractJType aNewType)
aNewType - must not be null.@Nonnull public JAnnotationUse annotate(@Nonnull AbstractJClass clazz)
annotate in interface IJAnnotatableclazz - The annotation class to annotate the field withJAnnotationUse@Nonnull public JAnnotationUse annotate(@Nonnull Class<? extends Annotation> clazz)
annotate in interface IJAnnotatableclazz - The annotation class to annotate the field withJAnnotationUse@Nonnull public <W extends IJAnnotationWriter<?>> W annotate2(@Nonnull Class<W> clazz)
IJAnnotatableannotate2 in interface IJAnnotatableW - Implementation typeclazz - Source class@Nonnull public Collection<JAnnotationUse> annotations()
IJAnnotatableIJAnnotatableannotations in interface IJAnnotatablenull.protected boolean isAnnotated()
public void bind(@Nonnull JFormatter f)
public void declare(@Nonnull JFormatter f)
declare in interface IJDeclarationpublic void generate(@Nonnull JFormatter f)
generate in interface IJGenerableCopyright © 2013–2017 Philip Helger. All rights reserved.