|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IJavaWriteAccessor
IJavaWriteAccessor provides write access to a Java property's value.
Method Summary | |
---|---|
IJavaPropertyDescriptor |
getPropertyDescriptor()
Returns the IJavaPropertyDescriptor for which this is a write accessor. |
void |
set(java.lang.Object obj,
java.lang.Object value)
Sets the property represented by this IJavaWriteAccessor object on the
specified object argument to the specified new value. |
void |
setBoolean(java.lang.Object obj,
boolean z)
Sets the value of a property as a boolean on the specified object. |
void |
setByte(java.lang.Object obj,
byte b)
Sets the value of a property as a byte on the specified object. |
void |
setChar(java.lang.Object obj,
char c)
Sets the value of a property as a char on the specified object. |
void |
setDouble(java.lang.Object obj,
double d)
Sets the value of a property as a double on the specified object. |
void |
setFloat(java.lang.Object obj,
float f)
Sets the value of a property as a float on the specified object. |
void |
setInt(java.lang.Object obj,
int i)
Sets the value of a property as an int on the specified object. |
void |
setLong(java.lang.Object obj,
long l)
Sets the value of a property as a long on the specified object. |
void |
setShort(java.lang.Object obj,
short s)
Sets the value of a property as a short on the specified object. |
Method Detail |
---|
IJavaPropertyDescriptor getPropertyDescriptor()
void set(java.lang.Object obj, java.lang.Object value) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
IJavaWriteAccessor
object on the
specified object argument to the specified new value. The new
value is automatically unwrapped if the underlying property has a
primitive type.
The operation proceeds as follows:
If the underlying property is static, the obj
argument is
ignored; it may be null.
Otherwise the underlying property is an instance property. If the
specified object argument is null, the method throws a
NullPointerException
. If the specified object argument is not
an instance of the class or interface declaring the underlying
property, the method throws an IllegalArgumentException
.
If the underlying property is of a primitive type, an unwrapping
conversion is attempted to convert the new value to a value of
a primitive type. If this attempt fails, the method throws an
IllegalArgumentException
.
If, after possible unwrapping, the new value cannot be
converted to the type of the underlying property by an identity or
widening conversion, the method throws an
IllegalArgumentException
.
The property is set to the possibly unwrapped and widened new value.
obj
- the object whose property should be modifiedvalue
- the new value for the property of obj
being modified
java.lang.IllegalAccessException
- if the underlying property
is inaccessible.
java.lang.IllegalArgumentException
- if the specified object is not an
instance of the class or interface declaring the underlying
property (or a subclass or implementor thereof),
or if an unwrapping conversion fails.
gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
- if there was a problem writing/setting
the property's value
java.lang.NullPointerException
- if the specified object is null
and the property is an instance property.
java.lang.ExceptionInInitializerError
- if the initialization provoked
by this method fails.void setBoolean(java.lang.Object obj, boolean z) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
boolean
on the specified object.
This method is equivalent to
set(obj, zObj)
,
where zObj
is a Boolean
object and
zObj.booleanValue() == z
.
obj
- the object whose property should be modifiedz
- the new value for the property of obj
being modified
java.lang.IllegalAccessException
- if the underlying property
is inaccessible.
java.lang.IllegalArgumentException
- if the specified object is not an
instance of the class or interface declaring the underlying
property (or a subclass or implementor thereof),
or if an unwrapping conversion fails.
gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
- if there was a problem writing/setting
the property's value
java.lang.NullPointerException
- if the specified object is null
and the property is an instance property.
java.lang.ExceptionInInitializerError
- if the initialization provoked
by this method fails.set(java.lang.Object, java.lang.Object)
void setByte(java.lang.Object obj, byte b) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
byte
on the specified object.
This method is equivalent to
set(obj, bObj)
,
where bObj
is a Byte
object and
bObj.byteValue() == b
.
obj
- the object whose property should be modifiedb
- the new value for the property of obj
being modified
java.lang.IllegalAccessException
- if the underlying property
is inaccessible.
java.lang.IllegalArgumentException
- if the specified object is not an
instance of the class or interface declaring the underlying
property (or a subclass or implementor thereof),
or if an unwrapping conversion fails.
gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
- if there was a problem writing/setting
the property's value
java.lang.NullPointerException
- if the specified object is null
and the property is an instance property.
java.lang.ExceptionInInitializerError
- if the initialization provoked
by this method fails.set(java.lang.Object, java.lang.Object)
void setChar(java.lang.Object obj, char c) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
char
on the specified object.
This method is equivalent to
set(obj, cObj)
,
where cObj
is a Character
object and
cObj.charValue() == c
.
obj
- the object whose property should be modifiedc
- the new value for the property of obj
being modified
java.lang.IllegalAccessException
- if the underlying property
is inaccessible.
java.lang.IllegalArgumentException
- if the specified object is not an
instance of the class or interface declaring the underlying
property (or a subclass or implementor thereof),
or if an unwrapping conversion fails.
gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
- if there was a problem writing/setting
the property's value
java.lang.NullPointerException
- if the specified object is null
and the property is an instance property.
java.lang.ExceptionInInitializerError
- if the initialization provoked
by this method fails.set(java.lang.Object, java.lang.Object)
void setShort(java.lang.Object obj, short s) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
short
on the specified object.
This method is equivalent to
set(obj, sObj)
,
where sObj
is a Short
object and
sObj.shortValue() == s
.
obj
- the object whose property should be modifieds
- the new value for the property of obj
being modified
java.lang.IllegalAccessException
- if the underlying property
is inaccessible.
java.lang.IllegalArgumentException
- if the specified object is not an
instance of the class or interface declaring the underlying
property (or a subclass or implementor thereof),
or if an unwrapping conversion fails.
gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
- if there was a problem writing/setting
the property's value
java.lang.NullPointerException
- if the specified object is null
and the property is an instance property.
java.lang.ExceptionInInitializerError
- if the initialization provoked
by this method fails.set(java.lang.Object, java.lang.Object)
void setInt(java.lang.Object obj, int i) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
int
on the specified object.
This method is equivalent to
set(obj, iObj)
,
where iObj
is a Integer
object and
iObj.intValue() == i
.
obj
- the object whose property should be modifiedi
- the new value for the property of obj
being modified
java.lang.IllegalAccessException
- if the underlying property
is inaccessible.
java.lang.IllegalArgumentException
- if the specified object is not an
instance of the class or interface declaring the underlying
property (or a subclass or implementor thereof),
or if an unwrapping conversion fails.
gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
- if there was a problem writing/setting
the property's value
java.lang.NullPointerException
- if the specified object is null
and the property is an instance property.
java.lang.ExceptionInInitializerError
- if the initialization provoked
by this method fails.set(java.lang.Object, java.lang.Object)
void setLong(java.lang.Object obj, long l) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
long
on the specified object.
This method is equivalent to
set(obj, lObj)
,
where lObj
is a Long
object and
lObj.longValue() == l
.
obj
- the object whose property should be modifiedl
- the new value for the property of obj
being modified
java.lang.IllegalAccessException
- if the underlying property
is inaccessible.
java.lang.IllegalArgumentException
- if the specified object is not an
instance of the class or interface declaring the underlying
property (or a subclass or implementor thereof),
or if an unwrapping conversion fails.
gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
- if there was a problem writing/setting
the property's value
java.lang.NullPointerException
- if the specified object is null
and the property is an instance property.
java.lang.ExceptionInInitializerError
- if the initialization provoked
by this method fails.set(java.lang.Object, java.lang.Object)
void setFloat(java.lang.Object obj, float f) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
float
on the specified object.
This method is equivalent to
set(obj, fObj)
,
where fObj
is a Float
object and
fObj.floatValue() == f
.
obj
- the object whose property should be modifiedf
- the new value for the property of obj
being modified
java.lang.IllegalAccessException
- if the underlying property
is inaccessible.
java.lang.IllegalArgumentException
- if the specified object is not an
instance of the class or interface declaring the underlying
property (or a subclass or implementor thereof),
or if an unwrapping conversion fails.
gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
- if there was a problem writing/setting
the property's value
java.lang.NullPointerException
- if the specified object is null
and the property is an instance property.
java.lang.ExceptionInInitializerError
- if the initialization provoked
by this method fails.set(java.lang.Object, java.lang.Object)
void setDouble(java.lang.Object obj, double d) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
double
on the specified object.
This method is equivalent to
set(obj, dObj)
,
where dObj
is a Double
object and
dObj.doubleValue() == d
.
obj
- the object whose property should be modifiedd
- the new value for the property of obj
being modified
java.lang.IllegalAccessException
- if the underlying property
is inaccessible.
java.lang.IllegalArgumentException
- if the specified object is not an
instance of the class or interface declaring the underlying
property (or a subclass or implementor thereof),
or if an unwrapping conversion fails.
gov.nasa.arc.brahms.common.exceptions.PropertyAccessException
- if there was a problem writing/setting
the property's value
java.lang.NullPointerException
- if the specified object is null
and the property is an instance property.
java.lang.ExceptionInInitializerError
- if the initialization provoked
by this method fails.set(java.lang.Object, java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |