|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.mtzky.reflect.PropDesc
public class PropDesc
Descriptors for Property (Getter, Setter ,
and public Field).
Note for getAnnotation(Class) and getAnnotations() method:
Prevails the annotation on a getter method if same
type is defined.
| コンストラクタの概要 | |
|---|---|
PropDesc(Field field)
|
|
PropDesc(Method accessor)
|
|
PropDesc(Method getter,
Method setter)
|
|
PropDesc(String name,
Class<?> beanClass)
|
|
PropDesc(String name,
Field field)
|
|
PropDesc(String name,
Method getter,
Method setter)
|
|
| メソッドの概要 | ||
|---|---|---|
|
get(Object obj)
Gets a property value from the object. |
|
|
getAnnotation(Class<T> annotationClass)
|
|
Annotation[] |
getAnnotations()
|
|
Class<?> |
getDeclaringClass()
Returns the Class object representing the class or interface that
declares the Method or the Field represented by this
PropDesc object. |
|
String |
getName()
|
|
Class<?> |
getType()
|
|
boolean |
hasField()
|
|
boolean |
hasGetter()
|
|
boolean |
hasSetter()
|
|
void |
set(Object obj,
Object value)
Sets a property value to the object. |
|
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public PropDesc(String name,
Class<?> beanClass)
name - beanClass - public PropDesc(Method accessor)
accessor -
public PropDesc(Method getter,
Method setter)
getter - setter -
public PropDesc(String name,
Method getter,
Method setter)
name - getter - setter - public PropDesc(Field field)
field -
public PropDesc(String name,
Field field)
name - field - | メソッドの詳細 |
|---|
public <T> T get(Object obj)
Gets a property value from the object. Returns null if an
Exception occurred.
T - obj - the instance to get property value
InvocationTargetRuntimeException - if failed to get
public void set(Object obj,
Object value)
Sets a property value to the object. Returns false if an
Exception occurred.
obj - the instance to set property valuevalue -
InvocationTargetRuntimeException - if failed to setpublic Class<?> getType()
public String getName()
public boolean hasGetter()
public boolean hasSetter()
public boolean hasField()
public Annotation[] getAnnotations()
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
public Class<?> getDeclaringClass()
Returns the Class object representing the class or interface that
declares the Method or the Field represented by this
PropDesc object.
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||