Class ReflectedProperty
- java.lang.Object
-
- org.eclipse.nebula.widgets.compositetable.internal.ReflectedProperty
-
public class ReflectedProperty extends java.lang.Object
Encapsulates a single JavaBeans-style property- Since:
- 3.3
-
-
Field Summary
Fields Modifier and Type Field Description private ReflectedMethod
getter
private java.lang.String
propertyName
private ReflectedMethod
setter
-
Constructor Summary
Constructors Constructor Description ReflectedProperty(java.lang.Object object, java.lang.String propertyName)
Construct a ReflectedProperty on some object, given the property name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
capitalize(java.lang.String string)
java.lang.Object
get()
Return the property's value.java.lang.String
getPropertyName()
Returns the property's name.java.lang.Class
getType()
Return the property's type.boolean
isReadOnly()
Returns if the property is read-only.private java.lang.String
makeBooleanGetterName(java.lang.String propertyName)
private java.lang.String
makeGetterName(java.lang.String propertyName)
private java.lang.String
makeSetterName(java.lang.String propertyName)
void
set(java.lang.Object newValue)
Set the property's value.
-
-
-
Field Detail
-
propertyName
private java.lang.String propertyName
-
getter
private ReflectedMethod getter
-
setter
private ReflectedMethod setter
-
-
Method Detail
-
makeBooleanGetterName
private java.lang.String makeBooleanGetterName(java.lang.String propertyName)
-
makeSetterName
private java.lang.String makeSetterName(java.lang.String propertyName)
-
makeGetterName
private java.lang.String makeGetterName(java.lang.String propertyName)
-
capitalize
private java.lang.String capitalize(java.lang.String string)
-
getType
public java.lang.Class getType()
Return the property's type. This is the same as the type returned by the getter.- Returns:
- The property's data type.
-
get
public java.lang.Object get()
Return the property's value.- Returns:
- The value in the property.
-
set
public void set(java.lang.Object newValue)
Set the property's value. If the property is read-only, the request is ignored.- Parameters:
newValue
- The value to set.
-
isReadOnly
public boolean isReadOnly()
Returns if the property is read-only.- Returns:
- false if the property has a setter; true otherwise.
-
getPropertyName
public java.lang.String getPropertyName()
Returns the property's name.- Returns:
- The property name.
-
-