T - the class of the arraypublic class ArrayMetaobjectProtocol<T> extends BeanMetaobjectProtocol<T>
BeanMetaobjectProtocol.BaseMetaobjectProtocol.Result| Constructor and Description |
|---|
ArrayMetaobjectProtocol(java.lang.Class<T> clazz,
boolean methodsEnumerable)
Constructs a new metaobject protocol for objects of a certain array class.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(java.lang.Object target,
long propertyId)
Behaves as
CallProtocol.get(Object, Object) with an
integer property ID. |
java.lang.Object |
get(java.lang.Object target,
java.lang.Object propertyId)
Retrieves the property value from the target object.
|
java.lang.Boolean |
has(java.lang.Object target,
long propertyId)
Behaves as
BaseMetaobjectProtocol.has(Object, Object) with an
integer property ID. |
java.lang.Boolean |
has(java.lang.Object target,
java.lang.Object propertyId)
Tells whether the target object has a particular property.
|
java.util.Iterator<java.lang.Object> |
propertyIds(java.lang.Object target)
Returns an iterator over the property IDs in the target object this MOP
knows about (and chooses to expose - not all properties must be exposed;
hidden properties are allowed).
|
BaseMetaobjectProtocol.Result |
put(java.lang.Object target,
long propertyId,
java.lang.Object value,
CallProtocol callProtocol)
Behaves as
BaseMetaobjectProtocol.put(Object, Object, Object,CallProtocol)
with an integer property ID. |
BaseMetaobjectProtocol.Result |
put(java.lang.Object target,
java.lang.Object propertyId,
java.lang.Object value,
CallProtocol callProtocol)
Associates a value with a property in the target object.
|
call, call, call, call, callStatic, delete, delete, newInstance, properties, representAspublic ArrayMetaobjectProtocol(java.lang.Class<T> clazz, boolean methodsEnumerable) throws java.beans.IntrospectionException
clazz - the class to construct a metaobject protocol formethodsEnumerable - if true, methods are enumerable through the
BeanMetaobjectProtocol.properties(Object) and propertyIds(Object).java.lang.IllegalArgumentException - if the passed class is not an array
class.java.beans.IntrospectionExceptionpublic java.lang.Object get(java.lang.Object target,
java.lang.Object propertyId)
CallProtocolget in interface CallProtocolget in class BeanMetaobjectProtocol<T>target - the target objectpropertyId - the ID of the property. Usually a String or an
Integer, but other property ID types can also be supported.BaseMetaobjectProtocol.Result.doesNotExist. If the protocol decides that
the property exists, but is not readable, it will return
BaseMetaobjectProtocol.Result.notReadable. If the protocol can not make
an authoritative decision, it will return BaseMetaobjectProtocol.Result.noAuthority.public java.lang.Object get(java.lang.Object target,
long propertyId)
MetaobjectProtocolCallProtocol.get(Object, Object) with an
integer property ID.get in interface MetaobjectProtocolget in class BeanMetaobjectProtocol<T>target - the target objectpropertyId - the ID of the property.CallProtocol.get(Object, Object).public java.lang.Boolean has(java.lang.Object target,
java.lang.Object propertyId)
BaseMetaobjectProtocolhas in interface BaseMetaobjectProtocolhas in class BeanMetaobjectProtocol<T>target - the target objectpropertyId - the ID of the property. Usually a String or an
Integer, but other property ID types can also be supported.Boolean.TRUE or Boolean.FALSE if the protocol
can authoritatively decide whether the target has or has not the
property, or null if it does not have the authority to decide.public java.lang.Boolean has(java.lang.Object target,
long propertyId)
MetaobjectProtocolBaseMetaobjectProtocol.has(Object, Object) with an
integer property ID.has in interface MetaobjectProtocolhas in class BeanMetaobjectProtocol<T>target - the target objectpropertyId - the ID of the property.BaseMetaobjectProtocol.has(Object, Object).public java.util.Iterator<java.lang.Object> propertyIds(java.lang.Object target)
MetaobjectProtocolpropertyIds in interface MetaobjectProtocolpropertyIds in class BeanMetaobjectProtocol<T>target - the target objectpublic BaseMetaobjectProtocol.Result put(java.lang.Object target, java.lang.Object propertyId, java.lang.Object value, CallProtocol callProtocol)
BaseMetaobjectProtocolput in interface BaseMetaobjectProtocolput in class BeanMetaobjectProtocol<T>target - the target objectpropertyId - the ID of the property. Usually a String or an
Integer, but other property ID types can also be supported.value - the new value for the propertycallProtocol - a marshaller that is used to convert the value in
case the property can only accept values of certain types, and the
metaobject protocol allows automatic coercing to those types.BaseMetaobjectProtocol.Result.doesNotExist. If the protocol
authoritatively decides that the property is read-only, it will return
BaseMetaobjectProtocol.Result.notWritable. If the property has a limitation on types
it can take as values, and the supplied marshaller is not able to
provide a suitable representation, then the value of the property is not
changed, and BaseMetaobjectProtocol.Result.noRepresentation is returned. Finally, if
the protocol doesn't have the authority to put the new property value,
it will leave the property value unchanged, and return
BaseMetaobjectProtocol.Result.noAuthority. If the operation succeeds,
BaseMetaobjectProtocol.Result.ok is returned.public BaseMetaobjectProtocol.Result put(java.lang.Object target, long propertyId, java.lang.Object value, CallProtocol callProtocol)
MetaobjectProtocolBaseMetaobjectProtocol.put(Object, Object, Object,CallProtocol)
with an integer property ID.
Associates a value with a property in the target object.put in interface MetaobjectProtocolput in class BeanMetaobjectProtocol<T>target - the target objectpropertyId - the ID of the property. Usually a String or an
Integer, but other property ID types can also be supported.value - the new value for the propertycallProtocol - a marshaller that is used to convert the value in
case the property can only accept values of certain types, and the
metaobject protocol allows automatic coercing to those types.BaseMetaobjectProtocol.Result.doesNotExist. If the protocol can not set the new value,
it will return BaseMetaobjectProtocol.Result.notWritable. If the protocol
doesn't have the authority to put the new property value, it will leave
the object unchanged, and return BaseMetaobjectProtocol.Result.noAuthority. If the
operation succeeds, BaseMetaobjectProtocol.Result.ok is returned.