| java.lang.Object org.geoserver.ows.util.OwsUtils
OwsUtils | public class OwsUtils (Code) | | Utility class for performing reflective operations.
author: Justin Deoliveira, The Open Planning Project |
Method Summary | |
public static Method | getter(Class clazz, String property, Class type) Returns a getter method for a property of java bean.
Parameters: clazz - The type of the bean. Parameters: property - The property name. Parameters: type - The type of the property, may be null. | static String | lax(String property) Does some checks on the property name to turn it into a java bean property. | public static Method | method(Class clazz, String name) Returns a method with a pariticular name of a class, ignoring method
paramters.
Parameters: clazz - The class Parameters: name - The name of the method. | public static Object | parameter(Object[] parameters, Class type) Returns an object of a particular type in a list of objects of
various types.
Parameters: parameters - A list of objects, of various types. Parameters: type - The type of paramter to be returned. | public static Object | property(Object object, String property, Class type) Reflectivley retreives a propety from a java bean.
Parameters: object - The java bean. Parameters: property - The property to retreive. Parameters: type - Teh type of the property to retreive. | public static Method | setter(Class clazz, String property, Class type) Returns a setter method for a property of java bean.
The type parameter may be null to indicate the
the setter for the property should be returned regardless of the type. | static Class | wrapper(Class primitive) Returns the wrapper class for a primitive class. |
getter | public static Method getter(Class clazz, String property, Class type)(Code) | | Returns a getter method for a property of java bean.
Parameters: clazz - The type of the bean. Parameters: property - The property name. Parameters: type - The type of the property, may be null. The setter method, or null if not found. |
lax | static String lax(String property)(Code) | | Does some checks on the property name to turn it into a java bean property.
Checks include collapsing any "_" characters.
|
method | public static Method method(Class clazz, String name)(Code) | | Returns a method with a pariticular name of a class, ignoring method
paramters.
Parameters: clazz - The class Parameters: name - The name of the method. The method, or null if it could not be found. |
parameter | public static Object parameter(Object[] parameters, Class type)(Code) | | Returns an object of a particular type in a list of objects of
various types.
Parameters: parameters - A list of objects, of various types. Parameters: type - The type of paramter to be returned. The object of the specified type, or null |
property | public static Object property(Object object, String property, Class type)(Code) | | Reflectivley retreives a propety from a java bean.
Parameters: object - The java bean. Parameters: property - The property to retreive. Parameters: type - Teh type of the property to retreive. The property, or null if it could not be found.. |
setter | public static Method setter(Class clazz, String property, Class type)(Code) | | Returns a setter method for a property of java bean.
The type parameter may be null to indicate the
the setter for the property should be returned regardless of the type. If
not null it will be used to filter the returned method.
Parameters: clazz - The type of the bean. Parameters: property - The property name. Parameters: type - The type of the property, may be null . The setter method, or null if not found. |
wrapper | static Class wrapper(Class primitive)(Code) | | Returns the wrapper class for a primitive class.
Parameters: primitive - A primtive class, like int.class, double.class, etc... |
|
|