org.infolayer.model
Class PropertyImplJava

java.lang.Object
  extended byorg.infolayer.model.PropertyImplJava
All Implemented Interfaces:
PropertyImpl

public class PropertyImplJava
extends java.lang.Object
implements PropertyImpl

Author:
haustein To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
 
Fields inherited from interface org.infolayer.model.PropertyImpl
SUPPORTS_ADD, SUPPORTS_REMOVE, SUPPORTS_SET
 
Constructor Summary
PropertyImplJava(java.lang.Class cls, java.lang.String name)
           
PropertyImplJava(java.lang.reflect.Method getter, java.lang.reflect.Method setter)
           
 
Method Summary
 boolean add(java.lang.Object obj, java.lang.Object value)
          Adds the given value to this property of obj. value must be a single valu, collections are not accepted!
 java.lang.Object get(java.lang.Object obj)
           
 int getSupportedOperations()
          Returns a binary combination of SUPPORTS_ADD, SUPPORTS_SET and SUPPORTS_REMOVE
 boolean remove(java.lang.Object obj, java.lang.Object value)
          Removes the given value from this property of obj. value must be a single value, collections are not accepted!
 void set(java.lang.Object obj, java.lang.Object value)
          Accepts single objects for properties where getMax() == 1, otherwise only collections.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyImplJava

public PropertyImplJava(java.lang.reflect.Method getter,
                        java.lang.reflect.Method setter)

PropertyImplJava

public PropertyImplJava(java.lang.Class cls,
                        java.lang.String name)
Method Detail

get

public java.lang.Object get(java.lang.Object obj)
Specified by:
get in interface PropertyImpl

set

public void set(java.lang.Object obj,
                java.lang.Object value)
Description copied from interface: PropertyImpl
Accepts single objects for properties where getMax() == 1, otherwise only collections. Any conversions must be handled by UmlProperty(!)

Specified by:
set in interface PropertyImpl

add

public boolean add(java.lang.Object obj,
                   java.lang.Object value)
Description copied from interface: PropertyImpl
Adds the given value to this property of obj. value must be a single valu, collections are not accepted! Null values are not supported.

Specified by:
add in interface PropertyImpl
Parameters:
obj - The property owner
value - The value to be added
Returns:
true if anything was changed

remove

public boolean remove(java.lang.Object obj,
                      java.lang.Object value)
Description copied from interface: PropertyImpl
Removes the given value from this property of obj. value must be a single value, collections are not accepted! Null values are not supported.

Specified by:
remove in interface PropertyImpl
Parameters:
obj - The property owner
value - The value to be added
Returns:
true if anything was changed

getSupportedOperations

public int getSupportedOperations()
Description copied from interface: PropertyImpl
Returns a binary combination of SUPPORTS_ADD, SUPPORTS_SET and SUPPORTS_REMOVE

Specified by:
getSupportedOperations in interface PropertyImpl