public class AbstractJField extends JAnnotatedElementHelper implements JMember
| Constructor and Description |
|---|
AbstractJField(JType type,
String name)
Creates a new JField.
|
| Modifier and Type | Method and Description |
|---|---|
JDocComment |
getComment()
Returns the JavaDoc comment describing this member.
|
JClass |
getDeclaringClass()
Returns the class in which this JField has been declared.
|
String |
getInitString()
Returns the initialization String for this JField.
|
JModifiers |
getModifiers()
Returns the modifiers for this JField.
|
String |
getName()
Returns the name of this JField.
|
JType |
getType()
Returns the JType representing the type of this JField.
|
boolean |
isDateTime()
Indicates whether this JField instance represents a field of type date/time.
|
void |
setComment(JDocComment comment)
Sets the JavaDoc comment describing this JField.
|
void |
setComment(String comment)
Sets the JavaDoc comment describing this JField.
|
void |
setDateTime(boolean isDateTime)
To indicate whether this JField instance represents a field of type date/time.
|
protected void |
setDeclaringClass(JClass declaringClass)
Sets the class that declares this JField.
|
void |
setInitString(String init)
Sets the initialization string for this JField.
|
void |
setModifiers(JModifiers modifiers)
Sets the access modifiers on this JField.
|
void |
setName(String name)
Sets the name of this JField.
|
String |
toString() |
addAnnotation, getAnnotation, getAnnotations, hasAnnotations, isAnnotationPresent, printAnnotations, removeAnnotationpublic JDocComment getComment()
public JClass getDeclaringClass()
public String getInitString()
public JModifiers getModifiers()
getModifiers in interface JMemberpublic String getName()
public JType getType()
public void setComment(JDocComment comment)
comment - The JavaDoc comment for this JField.public void setComment(String comment)
comment - The JavaDoc comment for this JField.public void setInitString(String init)
init - The initialization string for this member.public void setName(String name)
name - The name of this JField.public void setModifiers(JModifiers modifiers)
modifiers - The access modifiers to be used for this JField.protected void setDeclaringClass(JClass declaringClass)
declaringClass - The class in which this Jfield is declared.public boolean isDateTime()
public void setDateTime(boolean isDateTime)
isDateTime - True if this field is of type date/time.Copyright © 2016. All rights reserved.