public class Field extends ModelElement
Writable.Context
Constructor and Description |
---|
Field(Type type,
String variableName) |
Field(Type type,
String variableName,
boolean used) |
Modifier and Type | Method and Description |
---|---|
Set<Type> |
getImportTypes()
Returns a set containing those
Type s referenced by this model element for which an import statement needs
to be declared. |
Type |
getType()
Returns the type of this field.
|
String |
getVariableName()
Returns the variable name of this field.
|
boolean |
isTypeRequiresImport()
field needs to be imported
|
boolean |
isUsed()
indicates whether the field is indeed used
|
void |
setTypeRequiresImport(boolean typeRequiresImport)
set field needs to be imported
|
void |
setUsed(boolean isUsed)
sets the field as being used
|
write
getTemplateName, getTemplateNameForClass
public Type getType()
public String getVariableName()
public Set<Type> getImportTypes()
ModelElement
Type
s referenced by this model element for which an import statement needs
to be declared.getImportTypes
in class ModelElement
null
.public boolean isUsed()
public void setUsed(boolean isUsed)
isUsed
- must be true when being used.public boolean isTypeRequiresImport()
public void setTypeRequiresImport(boolean typeRequiresImport)
typeRequiresImport
- needs to be importedCopyright © 2012-2015 Gunnar Morling; All rights reserved. Released under the Apache Software License 2.0.