|
org.openide.nodes 7.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.beans.FeatureDescriptor
org.openide.nodes.Node.Property<T>
org.openide.nodes.PropertySupport.Reflection<T>
public static class PropertySupport.Reflection<T>
Support for properties from Java Reflection.
| Field Summary | |
|---|---|
protected Object |
instance
Instance of a bean. |
| Constructor Summary | |
|---|---|
PropertySupport.Reflection(Object instance,
Class<T> valueType,
Method getter,
Method setter)
Create a support with method objects specified. |
|
PropertySupport.Reflection(Object instance,
Class<T> valueType,
String property)
Create a support based on the property name. |
|
PropertySupport.Reflection(Object instance,
Class<T> valueType,
String getter,
String setter)
Create a support with methods specified by name. |
|
| Method Summary | |
|---|---|
boolean |
canRead()
Test whether the property is readable. |
boolean |
canWrite()
Test whether the property is writable. |
PropertyEditor |
getPropertyEditor()
Get a property editor for this property. |
T |
getValue()
Get the value. |
void |
setPropertyEditorClass(Class<? extends PropertyEditor> clazz)
Set the property editor explicitly. |
void |
setValue(T val)
Set the value. |
| Methods inherited from class org.openide.nodes.Node.Property |
|---|
equals, getHtmlDisplayName, getValueType, hashCode, isDefaultValue, restoreDefaultValue, supportsDefaultValue |
| Methods inherited from class java.beans.FeatureDescriptor |
|---|
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Object instance
| Constructor Detail |
|---|
public PropertySupport.Reflection(Object instance, Class<T> valueType, Method getter, Method setter)
instance - (Bean) object to work onvalueType - type of the propertygetter - getter method, can be nullsetter - setter method, can be null
IllegalArgumentException - if the methods are not publicpublic PropertySupport.Reflection(Object instance, Class<T> valueType, String getter, String setter) throws NoSuchMethodException
instance - (Bean) object to work onvalueType - type of the propertygetter - name of getter method, can be nullsetter - name of setter method, can be null
NoSuchMethodException - if the getter or setter methods cannot be foundpublic PropertySupport.Reflection(Object instance, Class<T> valueType, String property) throws NoSuchMethodException
get and
set, respectively.
instance - object to work onvalueType - type of the propertyproperty - name of property
NoSuchMethodException - if the getter or setter methods cannot be found| Method Detail |
|---|
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 method
InvocationTargetException - an exception during invocation
IllegalArgumentExceptionpublic 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 property
IllegalAccessException - cannot access the called method
IllegalArgumentException - wrong argument
InvocationTargetException - an exception during invocationpublic PropertyEditor getPropertyEditor()
Node.PropertyPropertyEditorManager.
getPropertyEditor in class Node.Property<T>null if there is no editorpublic void setPropertyEditorClass(Class<? extends PropertyEditor> clazz)
clazz - class type of the property editor
|
org.openide.nodes 7.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||