public abstract class Wrapper extends Object
构造器和说明 |
---|
Wrapper() |
限定符和类型 | 方法和说明 |
---|---|
abstract String[] |
getDeclaredMethodNames()
get method name array.
|
abstract String[] |
getMethodNames()
get method name array.
|
abstract String[] |
getPropertyNames()
get property name array.
|
abstract Class<?> |
getPropertyType(String pn)
get property type.
|
abstract Object |
getPropertyValue(Object instance,
String pn)
get property value.
|
Object[] |
getPropertyValues(Object instance,
String[] pns)
get property value.
|
static Wrapper |
getWrapper(Class<?> c)
get wrapper.
|
boolean |
hasMethod(String name)
has method.
|
abstract boolean |
hasProperty(String name)
has property.
|
abstract Object |
invokeMethod(Object instance,
String mn,
Class<?>[] types,
Object[] args)
invoke method.
|
abstract void |
setPropertyValue(Object instance,
String pn,
Object pv)
set property value.
|
void |
setPropertyValues(Object instance,
String[] pns,
Object[] pvs)
set property value.
|
public static Wrapper getWrapper(Class<?> c)
c
- Class instance.public abstract String[] getPropertyNames()
public abstract Class<?> getPropertyType(String pn)
pn
- property name.public abstract boolean hasProperty(String name)
name
- property name.public abstract Object getPropertyValue(Object instance, String pn) throws NoSuchPropertyException, IllegalArgumentException
instance
- instance.pn
- property name.NoSuchPropertyException
IllegalArgumentException
public abstract void setPropertyValue(Object instance, String pn, Object pv) throws NoSuchPropertyException, IllegalArgumentException
instance
- instance.pn
- property name.pv
- property value.NoSuchPropertyException
IllegalArgumentException
public Object[] getPropertyValues(Object instance, String[] pns) throws NoSuchPropertyException, IllegalArgumentException
instance
- instance.pns
- property name array.NoSuchPropertyException
IllegalArgumentException
public void setPropertyValues(Object instance, String[] pns, Object[] pvs) throws NoSuchPropertyException, IllegalArgumentException
instance
- instance.pns
- property name array.pvs
- property value array.NoSuchPropertyException
IllegalArgumentException
public abstract String[] getMethodNames()
public abstract String[] getDeclaredMethodNames()
public boolean hasMethod(String name)
name
- method name.public abstract Object invokeMethod(Object instance, String mn, Class<?>[] types, Object[] args) throws NoSuchMethodException, InvocationTargetException
instance
- instance.mn
- method name.types
- args
- argument array.NoSuchMethodException
InvocationTargetException
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.