public class Reflector extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
canControlMemberAccessible()
Checks whether can control member accessible.
|
String |
findPropertyName(String name) |
Constructor<?> |
getDefaultConstructor() |
String[] |
getGetablePropertyNames()
Gets an array of the readable properties for an object.
|
Invoker |
getGetInvoker(String propertyName) |
Class<?> |
getGetterType(String propertyName)
Gets the type for a property getter.
|
String[] |
getSetablePropertyNames()
Gets an array of the writable properties for an object.
|
Invoker |
getSetInvoker(String propertyName) |
Class<?> |
getSetterType(String propertyName)
Gets the type for a property setter.
|
Class<?> |
getType()
Gets the name of the class the instance provides information for.
|
boolean |
hasDefaultConstructor() |
boolean |
hasGetter(String propertyName)
Check to see if a class has a readable property by name.
|
boolean |
hasSetter(String propertyName)
Check to see if a class has a writable property by name.
|
public Reflector(Class<?> clazz)
public static boolean canControlMemberAccessible()
public Class<?> getType()
public Constructor<?> getDefaultConstructor()
public boolean hasDefaultConstructor()
public Class<?> getSetterType(String propertyName)
propertyName
- - the name of the propertypublic Class<?> getGetterType(String propertyName)
propertyName
- - the name of the propertypublic String[] getGetablePropertyNames()
public String[] getSetablePropertyNames()
public boolean hasSetter(String propertyName)
propertyName
- - the name of the property to checkpublic boolean hasGetter(String propertyName)
propertyName
- - the name of the property to checkCopyright © 2009–2021 MyBatis.org. All rights reserved.