T
- type of the whole propertyE
- type of one elementpublic class IndexedPropertySupport<T,E> extends Node.IndexedProperty<T,E>
Modifier and Type | Field and Description |
---|---|
protected Object |
instance
Instance of the bean.
|
Constructor and Description |
---|
IndexedPropertySupport(Object instance,
Class<T> valueType,
Class<E> elementType,
Method getter,
Method setter,
Method indexedGetter,
Method indexedSetter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canIndexedRead()
Test whether the property is readable by index.
|
boolean |
canIndexedWrite()
Test whether the property is writable by index.
|
boolean |
canRead()
Test whether the property is readable.
|
boolean |
canWrite()
Test whether the property is writable.
|
E |
getIndexedValue(int index)
Get the value of the property at an index.
|
T |
getValue()
Get the value.
|
void |
setDisplayName(String s) |
void |
setIndexedValue(int index,
E val)
Set the value of the property at an index.
|
void |
setName(String s) |
void |
setShortDescription(String s) |
void |
setValue(T val)
Set the value.
|
equals, getElementType, getIndexedPropertyEditor, hashCode
getHtmlDisplayName, getPropertyEditor, getValueType, isDefaultValue, restoreDefaultValue, supportsDefaultValue
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setExpert, setHidden, setPreferred, setValue, toString
protected Object instance
public IndexedPropertySupport(Object instance, Class<T> valueType, Class<E> elementType, Method getter, Method setter, Method indexedGetter, Method indexedSetter)
instance
- the bean for which these properties existvalueType
- type of the entire propertyelementType
- type of one element of the propertygetter
- get method for the entire propertysetter
- set method for the entire propertyindexedGetter
- get method for one elementindexedSetter
- set method for one elementpublic final void setDisplayName(String s)
setDisplayName
in class FeatureDescriptor
public final void setName(String s)
setName
in class FeatureDescriptor
public final void setShortDescription(String s)
setShortDescription
in class FeatureDescriptor
public boolean canRead()
Node.Property
canRead
in class Node.Property<T>
true
if it ispublic T getValue() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Node.Property
getValue
in class Node.Property<T>
IllegalAccessException
- cannot access the called methodInvocationTargetException
- an exception during invocationIllegalArgumentException
public boolean canWrite()
Node.Property
canWrite
in class Node.Property<T>
true
if the read of the value is supportedpublic void setValue(T val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Node.Property
setValue
in class Node.Property<T>
val
- the new value of the propertyIllegalAccessException
- cannot access the called methodIllegalArgumentException
- wrong argumentInvocationTargetException
- an exception during invocationpublic boolean canIndexedRead()
Node.IndexedProperty
canIndexedRead
in class Node.IndexedProperty<T,E>
true
if sopublic E getIndexedValue(int index) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Node.IndexedProperty
getIndexedValue
in class Node.IndexedProperty<T,E>
index
- the indexIllegalAccessException
- cannot access the called methodIllegalArgumentException
- wrong argumentInvocationTargetException
- an exception during invocationpublic boolean canIndexedWrite()
Node.IndexedProperty
canIndexedWrite
in class Node.IndexedProperty<T,E>
true
if sopublic void setIndexedValue(int index, E val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Node.IndexedProperty
setIndexedValue
in class Node.IndexedProperty<T,E>
index
- the indexval
- the value to setIllegalAccessException
- cannot access the called methodIllegalArgumentException
- wrong argumentInvocationTargetException
- an exception during invocation