org.nakedobjects.object.reflect
Class Association

java.lang.Object
  extended byorg.nakedobjects.object.reflect.Member
      extended byorg.nakedobjects.object.reflect.Field
          extended byorg.nakedobjects.object.reflect.Association
Direct Known Subclasses:
OneToManyAssociation

public class Association
extends Field


Nested Class Summary
 
Nested classes inherited from class org.nakedobjects.object.reflect.Member
Member.DefaultAbout
 
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)
           
 
Method Summary
 Naked get(NakedObject fromObject)
          call the accessor method on the specified object to return the data it holds
 About getAbout(NakedObject object, NakedObject value)
           
protected  java.lang.String getLabel(About about)
           
 java.lang.String getLabel(NakedObject object)
           
 boolean hasAddMethod()
           
 void init(NakedObject inObject, java.lang.Object setValue)
          Set the data in an NakedObject.
 void remove(NakedObject inObject, NakedObject setValue)
          Remove an associated object (the element) from the specified NakedObject in the association field represented by this object.
 void set(NakedObject inObject, java.lang.Object setValue)
          Set the data in an NakedObject.
 java.lang.String toString()
           
 
Methods inherited from class org.nakedobjects.object.reflect.Field
getAbout, getType, isAggregate, isDerived, isValue
 
Methods inherited from class org.nakedobjects.object.reflect.Member
getAboutMethod, getMemberMethod, getName, getObjectStore, hasAbout, init, isDistributed, isProxied
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

addMethod

protected java.lang.reflect.Method addMethod

removeMethod

protected java.lang.reflect.Method removeMethod

setMethod

protected java.lang.reflect.Method setMethod
Constructor Detail

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)
Method Detail

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)