Package com.db4o.reflect.jdk
Class JdkReflector
- java.lang.Object
-
- com.db4o.reflect.jdk.JdkReflector
-
public class JdkReflector extends java.lang.Object implements Reflector
db4o wrapper for JDK reflector functionality- See Also:
ExtObjectContainer.reflector()
,GenericReflector
-
-
Constructor Summary
Constructors Constructor Description JdkReflector(JdkLoader classLoader)
ConstructorJdkReflector(java.lang.ClassLoader classLoader)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReflectArray
array()
ReflectArray factoryReflectorConfiguration
configuration()
void
configuration(ReflectorConfiguration config)
protected JdkClass
createClass(java.lang.Class clazz)
creates a Class reflector when passed a class.java.lang.Object
deepClone(java.lang.Object obj)
Creates a copy of the objectReflectClass
forClass(java.lang.Class clazz)
Returns ReflectClass for the specified classReflectClass
forName(java.lang.String className)
Returns ReflectClass for the specified class nameReflectClass
forObject(java.lang.Object a_object)
Returns ReflectClass for the specified class objectboolean
isCollection(ReflectClass candidate)
Method stub.boolean
methodCallsSupported()
Method stub.protected Reflector
parent()
void
setParent(Reflector reflector)
Sets parent reflectorstatic ReflectClass[]
toMeta(Reflector reflector, java.lang.Class[] clazz)
Creates ReflectClass[] array from the Class[] array using the reflector specifiedstatic java.lang.Class
toNative(ReflectClass claxx)
Translates a ReflectClass into a native Class
-
-
-
Field Detail
-
_parent
protected Reflector _parent
-
-
Constructor Detail
-
JdkReflector
public JdkReflector(java.lang.ClassLoader classLoader)
Constructor- Parameters:
classLoader
- class loader
-
JdkReflector
public JdkReflector(JdkLoader classLoader)
Constructor- Parameters:
classLoader
- class loader
-
-
Method Detail
-
array
public ReflectArray array()
ReflectArray factory
-
deepClone
public java.lang.Object deepClone(java.lang.Object obj)
Creates a copy of the object
-
forClass
public ReflectClass forClass(java.lang.Class clazz)
Returns ReflectClass for the specified class
-
forName
public ReflectClass forName(java.lang.String className)
Returns ReflectClass for the specified class name
-
createClass
protected JdkClass createClass(java.lang.Class clazz)
creates a Class reflector when passed a class. This method is protected to allow overriding in cusom reflectors that override JdkReflector.- Parameters:
clazz
- the class- Returns:
- the class reflector
-
forObject
public ReflectClass forObject(java.lang.Object a_object)
Returns ReflectClass for the specified class object
-
isCollection
public boolean isCollection(ReflectClass candidate)
Method stub. Returns false.- Specified by:
isCollection
in interfaceReflector
-
methodCallsSupported
public boolean methodCallsSupported()
Method stub. Returns false.
-
setParent
public void setParent(Reflector reflector)
Sets parent reflector
-
toMeta
public static ReflectClass[] toMeta(Reflector reflector, java.lang.Class[] clazz)
Creates ReflectClass[] array from the Class[] array using the reflector specified- Parameters:
reflector
- reflector to useclazz
- class- Returns:
- ReflectClass[] array
-
toNative
public static java.lang.Class toNative(ReflectClass claxx)
Translates a ReflectClass into a native Class- Parameters:
claxx
- ReflectClass to translate- Returns:
- Class
-
configuration
public void configuration(ReflectorConfiguration config)
- Specified by:
configuration
in interfaceReflector
-
configuration
public ReflectorConfiguration configuration()
-
parent
protected Reflector parent()
-
-