org.nakedobjects.object.reflect
Class Association
java.lang.Object
org.nakedobjects.object.reflect.Member
org.nakedobjects.object.reflect.Field
org.nakedobjects.object.reflect.Association
- Direct Known Subclasses:
- OneToManyAssociation
- public class Association
- extends Field
Field Summary |
protected java.lang.reflect.Method |
addMethod
|
protected java.lang.reflect.Method |
removeMethod
|
protected java.lang.reflect.Method |
setMethod
|
Fields inherited from class org.nakedobjects.object.reflect.Member |
DEFAULT |
Constructor Summary |
Association(java.lang.String name,
java.lang.Class type,
java.lang.reflect.Method get,
java.lang.reflect.Method set,
java.lang.reflect.Method add,
java.lang.reflect.Method remove,
java.lang.reflect.Method about)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
addMethod
protected java.lang.reflect.Method addMethod
removeMethod
protected java.lang.reflect.Method removeMethod
setMethod
protected java.lang.reflect.Method setMethod
Association
public Association(java.lang.String name,
java.lang.Class type,
java.lang.reflect.Method get,
java.lang.reflect.Method set,
java.lang.reflect.Method add,
java.lang.reflect.Method remove,
java.lang.reflect.Method about)
getAbout
public About getAbout(NakedObject object,
NakedObject value)
getLabel
public java.lang.String getLabel(NakedObject object)
- Overrides:
getLabel
in class Field
get
public Naked get(NakedObject fromObject)
- call the accessor method on the specified object to return the data it holds
- Specified by:
get
in class Field
hasAddMethod
public boolean hasAddMethod()
init
public void init(NakedObject inObject,
java.lang.Object setValue)
- Set the data in an NakedObject. Passes in an existing object to for the EO to reference.
remove
public void remove(NakedObject inObject,
NakedObject setValue)
- Remove an associated object (the element) from the specified NakedObject in the association field represented by this object.
set
public void set(NakedObject inObject,
java.lang.Object setValue)
- Set the data in an NakedObject. Passes in an existing object to for the EO to reference.
toString
public java.lang.String toString()
- Overrides:
toString
in class Member
getLabel
protected java.lang.String getLabel(About about)