to.etc.util
Class PropertyInfo
java.lang.Object
to.etc.util.PropertyInfo
- All Implemented Interfaces:
- IPropertyAccessor
@Immutable
public final class PropertyInfo
- extends java.lang.Object
- implements IPropertyAccessor
Information on properties on a class.
- Author:
- Frits Jalvingh
Created on Aug 9, 2007
Constructor Summary |
PropertyInfo(java.lang.String name,
java.lang.reflect.Method getter,
java.lang.reflect.Method setter)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PropertyInfo
public PropertyInfo(java.lang.String name,
java.lang.reflect.Method getter,
java.lang.reflect.Method setter)
getName
@Nonnull
public java.lang.String getName()
- Specified by:
getName
in interface IPropertyAccessor
getGetter
@Nonnull
public java.lang.reflect.Method getGetter()
getSetter
@Nullable
public java.lang.reflect.Method getSetter()
getActualType
@Nonnull
public java.lang.Class<?> getActualType()
- Specified by:
getActualType
in interface IPropertyAccessor
getActualGenericType
public java.lang.reflect.Type getActualGenericType()
- Specified by:
getActualGenericType
in interface IPropertyAccessor
isCollectionOrArrayType
public boolean isCollectionOrArrayType()
- Returns T if this is either a collection or an array.
- Returns:
isCollectionType
public boolean isCollectionType()
isArrayType
public boolean isArrayType()
getCollectionValueType
public java.lang.Class<?> getCollectionValueType()
getValue
@Nullable
public java.lang.Object getValue(@Nullable
java.lang.Object instance)
throws java.lang.Exception
- Specified by:
getValue
in interface IPropertyAccessor
- Throws:
java.lang.Exception
setValue
public void setValue(@Nullable
java.lang.Object instance,
@Nullable
java.lang.Object value)
throws java.lang.Exception
- Specified by:
setValue
in interface IPropertyAccessor
- Throws:
java.lang.Exception
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object