db4o 6.1

com.db4o.reflect
Interface Reflector

All Known Implementing Classes:
JdkReflector, SelfReflector

public interface Reflector

root of the reflection implementation API.

The open reflection interface is supplied to allow to implement reflection functionality on JDKs that do not come with the java.lang.reflect.* package.

See the code in com.db4o.samples.reflect for a reference implementation that uses java.lang.reflect.*.

Use Db4o.configure().reflectWith(IReflect reflector) to register the use of your implementation before opening database files.


Method Summary
 ReflectArray array()
          returns an IArray object, the equivalent to java.lang.reflect.Array.
 boolean constructorCallsSupported()
          specifiy whether parameterized Constructors are supported.
 ReflectClass forClass(java.lang.Class clazz)
          returns an IClass for a Class
 ReflectClass forName(java.lang.String className)
          returns an IClass class reflector for a class name or null if no such class is found
 ReflectClass forObject(java.lang.Object a_object)
          returns an IClass for an object or null if the passed object is null.
 boolean isCollection(ReflectClass claxx)
           
 void setParent(Reflector reflector)
           
 

Method Detail

array

ReflectArray array()
returns an IArray object, the equivalent to java.lang.reflect.Array.


constructorCallsSupported

boolean constructorCallsSupported()
specifiy whether parameterized Constructors are supported.

The support of Constructors is optional. If Constructors are not supported, every persistent class needs a public default constructor with zero parameters.


forClass

ReflectClass forClass(java.lang.Class clazz)
returns an IClass for a Class


forName

ReflectClass forName(java.lang.String className)
returns an IClass class reflector for a class name or null if no such class is found


forObject

ReflectClass forObject(java.lang.Object a_object)
returns an IClass for an object or null if the passed object is null.


isCollection

boolean isCollection(ReflectClass claxx)

setParent

void setParent(Reflector reflector)

db4o 6.1