|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FieldHolder<T>
| Method Summary | |
|---|---|
Field<T> |
addField()
Add a new Java Field to this T instance. |
Field<T> |
addField(String declaration)
Add a new Field declaration to this T instance, using the given String as the declaration. |
Field<T> |
getField(String name)
Get the Field with the given name and return it, otherwise, return null. |
List<Field<T>> |
getFields()
Get a list of all Fields declared by this T, or return an empty list if no Fields are
declared. |
boolean |
hasField(Field<T> field)
Return whether or not this T declares the given Field instance. |
boolean |
hasField(String name)
Return whether or not this T declares a Field with the given name. |
T |
removeField(Field<T> field)
Remove the given Field from this T instance, if it exists; otherwise, do nothing. |
| Methods inherited from interface org.jboss.forge.parser.java.MemberHolder |
|---|
getMembers |
| Method Detail |
|---|
Field<T> addField()
Field to this T instance. This field will be a stub until further modified.
Field<T> addField(String declaration)
Field declaration to this T instance, using the given String as the declaration.
For example:Field f = javaClass.addField("private String newField;");
boolean hasField(String name)
T declares a Field with the given name.
boolean hasField(Field<T> field)
T declares the given Field instance.
Field<T> getField(String name)
Field with the given name and return it, otherwise, return null.
List<Field<T>> getFields()
Fields declared by this T, or return an empty list if no Fields are
declared.
T removeField(Field<T> field)
Field from this T instance, if it exists; otherwise, do nothing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||