public class JField extends Object
Modifier and Type | Method and Description |
---|---|
void |
appendAnnotation(String annotation) |
JAnnotations |
getAnnotations() |
JDocComment |
getComment()
Returns the 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 represting the type of this JField
|
void |
setAnnotations(JAnnotations annotations) |
void |
setComment(JDocComment comment)
Sets the comment describing this member.
|
void |
setComment(String comment)
Sets the comment describing this member.
|
protected void |
setDeclaringClass(JClass declaringClass) |
void |
setInitString(String init)
Sets the initialization string for this JField;
Allows some flexibility in declaring default values.
|
void |
setModifiers(JModifiers modifiers) |
void |
setName(String name)
Sets the name of this JField
|
String |
toString() |
public JDocComment getComment()
public JClass getDeclaringClass()
public String getInitString()
public JModifiers getModifiers()
public String getName()
public JType getType()
public void setComment(JDocComment comment)
comment
- the JDocComment for this memberpublic void setComment(String comment)
comment
- the JDocComment for this memberpublic void setInitString(String init)
init
- the initialization string for this member.public void setName(String name) throws IllegalArgumentException
name
- the name of this JFieldIllegalArgumentException
- when the
name is not a valid Java member name, or if a member
with the given name already exists in the declaring classpublic void setModifiers(JModifiers modifiers)
protected void setDeclaringClass(JClass declaringClass)
public JAnnotations getAnnotations()
public void appendAnnotation(String annotation)
annotation
- the annotation to appendpublic void setAnnotations(JAnnotations annotations)
annotations
- the annotations to setCopyright © 2001–2024 Codehaus Plexus. All rights reserved.