Class JDOImplHelper
- java.lang.Object
-
- javax.jdo.spi.JDOImplHelper
-
public class JDOImplHelper extends java.lang.Object
This class is a helper class for JDO implementations. It contains methods to register metadata for persistence-capable classes and to perform common operations needed by implementations, not by end users.JDOImplHelper
allows construction of instances of persistence-capable classes without using reflection.Persistence-capable classes register themselves via a static method at class load time. There is no security restriction on this access. JDO implementations get access to the functions provided by this class only if they are authorized by the security manager. To avoid having every call go through the security manager, only the call to get an instance is checked. Once an implementation has an instance, any of the methods can be invoked without security checks.
- Version:
- 2.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
JDOImplHelper.Meta
This is a helper class to manage metadata per persistence-capable class.static interface
JDOImplHelper.StateInterrogationBooleanReturn
This is an interface used to interrogate the state of an instance that does not implement PersistenceCapable.static interface
JDOImplHelper.StateInterrogationObjectReturn
This is an interface used to interrogate the state of an instance that does not implement PersistenceCapable.static interface
JDOImplHelper.StringConstructor
Construct an instance of a key class using a String as input.
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map
authorizedStateManagerClasses
This Set contains all classes that have registered for setStateManager permissions via authorizeStateManagerClass.private static java.text.DateFormat
dateFormat
The default DateFormat instance.private static java.lang.String
dateFormatPattern
The DateFormat pattern.private static javax.xml.parsers.DocumentBuilderFactory
documentBuilderFactory
The DocumentBuilderFactory used during jdoconfig.xml parsing.private static org.xml.sax.ErrorHandler
errorHandler
The ErrorHandler used during jdoconfig.xml parsing.private static JDOImplHelper
jdoImplHelper
The singletonJDOImplHelper
instance.private static java.util.List
listeners
This list contains the registered listeners forRegisterClassEvent
s.private static I18NHelper
msg
The Internationalization message helper.private static java.util.Map
registeredClasses
This synchronizedHashMap
contains a static mapping ofPersistenceCapable
class to metadata for the class used for constructing new instances.private static java.util.List
stateInterrogations
The list of registered StateInterrogation instances(package private) static java.util.Map
stringConstructorMap
Special StringConstructor instances for use with specific classes that have no public String constructor.
-
Constructor Summary
Constructors Modifier Constructor Description private
JDOImplHelper()
Creates new JDOImplHelper
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRegisterClassListener(RegisterClassListener crl)
Add the specifiedRegisterClassListener
to the listener list.void
addStateInterrogation(StateInterrogation si)
Add a StateInterrogation to the list.static void
checkAuthorizedStateManager(StateManager sm)
Check that the parameter instance is of a class that is authorized for JDOPermission("setStateManager").static void
checkAuthorizedStateManagerClass(java.lang.Class smClass)
Check that the parameter instance is a class that is authorized for JDOPermission("setStateManager").static java.lang.Object
construct(java.lang.String className, java.lang.String keyString)
Construct an instance of the parameter class, using the keyString as an argument to the constructor.void
copyKeyFieldsFromObjectId(java.lang.Class pcClass, PersistenceCapable.ObjectIdFieldConsumer fm, java.lang.Object oid)
Copy fields to an outside source from the key fields in the ObjectId.void
copyKeyFieldsToObjectId(java.lang.Class pcClass, PersistenceCapable.ObjectIdFieldSupplier fm, java.lang.Object oid)
Copy fields from an outside source to the key fields in the ObjectId.(package private) static java.text.DateFormat
getDateTimeInstance()
Get the DateFormat instance for the default locale from the VM.byte[]
getFieldFlags(java.lang.Class pcClass)
Get the field flags for aPersistenceCapable
class.java.lang.String[]
getFieldNames(java.lang.Class pcClass)
Get the field names for aPersistenceCapable
class.java.lang.Class[]
getFieldTypes(java.lang.Class pcClass)
Get the field types for aPersistenceCapable
class.static JDOImplHelper
getInstance()
Get an instance ofJDOImplHelper
.private static java.util.Locale
getLocale(java.lang.String s)
Parse the String to a Locale.private static JDOImplHelper.Meta
getMeta(java.lang.Class pcClass)
Look up the metadata for aPersistenceCapable
class.java.lang.Class
getPersistenceCapableSuperclass(java.lang.Class pcClass)
Get the persistence-capable superclass for aPersistenceCapable
class.java.util.Collection
getRegisteredClasses()
Returns a collection of class objects of the registered persistence-capable classes.static javax.xml.parsers.DocumentBuilderFactory
getRegisteredDocumentBuilderFactory()
Return the registered instance of DocumentBuilderFactory.static org.xml.sax.ErrorHandler
getRegisteredErrorHandler()
Return the registered instance of ErrorHandler.private java.util.Iterator
getStateInterrogationIterator()
Return an Iterator over all StateInterrogation instances.private static boolean
isClassLoadable(java.lang.String className)
Determine if a class is loadable in the current environment.PersistenceCapable
newInstance(java.lang.Class pcClass, StateManager sm)
Create a new instance of the class and assign itsjdoStateManager
.PersistenceCapable
newInstance(java.lang.Class pcClass, StateManager sm, java.lang.Object oid)
Create a new instance of the class and assign itsjdoStateManager
and key values from the ObjectId.java.lang.Object
newObjectIdInstance(java.lang.Class pcClass)
Create a new instance of the ObjectId class of thisPersistenceCapable
class.java.lang.Object
newObjectIdInstance(java.lang.Class pcClass, java.lang.Object obj)
Create a new instance of the class used by the parameter Class for JDO identity, using the key constructor of the object id class.java.lang.Object
nonBinaryCompatibleGet(java.lang.Object pc, JDOImplHelper.StateInterrogationObjectReturn sibr)
Return an object associated with a non-binary-compatible instance.boolean
nonBinaryCompatibleIs(java.lang.Object pc, JDOImplHelper.StateInterrogationBooleanReturn sibr)
Determine the state of a non-binary-compatible instance.void
nonBinaryCompatibleMakeDirty(java.lang.Object pc, java.lang.String fieldName)
Mark a non-binary-compatible instance dirty.static void
registerAuthorizedStateManagerClass(java.lang.Class smClass)
Register a class authorized to replaceStateManager.static void
registerAuthorizedStateManagerClasses(java.util.Collection smClasses)
Register classes authorized to replaceStateManager.static void
registerClass(java.lang.Class pcClass, java.lang.String[] fieldNames, java.lang.Class[] fieldTypes, byte[] fieldFlags, java.lang.Class persistenceCapableSuperclass, PersistenceCapable pc)
Register metadata by class.void
registerDateFormat(java.text.DateFormat df)
Register a DateFormat instance for use with constructing Date instances.void
registerDocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory factory)
Register a DocumentBuilderFactory instance for use in parsing the resource(s) META-INF/jdoconfig.xml.void
registerErrorHandler(org.xml.sax.ErrorHandler handler)
Register an ErrorHandler instance for use in parsing the resource(s) META-INF/jdoconfig.xml.java.lang.Object
registerStringConstructor(java.lang.Class cls, JDOImplHelper.StringConstructor sc)
Register special StringConstructor instances.void
removeRegisterClassListener(RegisterClassListener crl)
Remove the specifiedRegisterClassListener
from the listener list.void
removeStateInterrogation(StateInterrogation si)
Remove a StateInterrogation from the list.void
unregisterClass(java.lang.Class pcClass)
Unregister metadata by class.void
unregisterClasses(java.lang.ClassLoader cl)
Unregister metadata by class loader.
-
-
-
Field Detail
-
registeredClasses
private static java.util.Map registeredClasses
This synchronizedHashMap
contains a static mapping ofPersistenceCapable
class to metadata for the class used for constructing new instances. New entries are added by the static method in eachPersistenceCapable
class. Entries are never removed.
-
authorizedStateManagerClasses
private static java.util.Map authorizedStateManagerClasses
This Set contains all classes that have registered for setStateManager permissions via authorizeStateManagerClass.
-
listeners
private static java.util.List listeners
This list contains the registered listeners forRegisterClassEvent
s.
-
stateInterrogations
private static java.util.List stateInterrogations
The list of registered StateInterrogation instances
-
jdoImplHelper
private static JDOImplHelper jdoImplHelper
The singletonJDOImplHelper
instance.
-
msg
private static final I18NHelper msg
The Internationalization message helper.
-
dateFormatPattern
private static java.lang.String dateFormatPattern
The DateFormat pattern.
-
dateFormat
private static java.text.DateFormat dateFormat
The default DateFormat instance.
-
documentBuilderFactory
private static javax.xml.parsers.DocumentBuilderFactory documentBuilderFactory
The DocumentBuilderFactory used during jdoconfig.xml parsing.
-
errorHandler
private static org.xml.sax.ErrorHandler errorHandler
The ErrorHandler used during jdoconfig.xml parsing.
-
stringConstructorMap
static java.util.Map stringConstructorMap
Special StringConstructor instances for use with specific classes that have no public String constructor. The Map is keyed on class instance and the value is an instance of StringConstructor.
-
-
Method Detail
-
getInstance
public static JDOImplHelper getInstance() throws java.lang.SecurityException
Get an instance ofJDOImplHelper
. This method checks that the caller is authorized forJDOPermission("getMetadata")
, and if not, throwsSecurityException
.- Returns:
- an instance of
JDOImplHelper
. - Throws:
java.lang.SecurityException
- if the caller is not authorized for JDOPermission("getMetadata").
-
getFieldNames
public java.lang.String[] getFieldNames(java.lang.Class pcClass)
Get the field names for aPersistenceCapable
class. The order of fields is the natural ordering of theString
class (without considering localization).- Parameters:
pcClass
- thePersistenceCapable
class.- Returns:
- the field names for the class.
-
getFieldTypes
public java.lang.Class[] getFieldTypes(java.lang.Class pcClass)
Get the field types for aPersistenceCapable
class. The order of fields is the same as for field names.- Parameters:
pcClass
- thePersistenceCapable
class.- Returns:
- the field types for the class.
-
getFieldFlags
public byte[] getFieldFlags(java.lang.Class pcClass)
Get the field flags for aPersistenceCapable
class. The order of fields is the same as for field names.- Parameters:
pcClass
- thePersistenceCapable
class.- Returns:
- the field types for the class.
-
getPersistenceCapableSuperclass
public java.lang.Class getPersistenceCapableSuperclass(java.lang.Class pcClass)
Get the persistence-capable superclass for aPersistenceCapable
class.- Parameters:
pcClass
- thePersistenceCapable
class.- Returns:
- The
PersistenceCapable
superclass for this class, ornull
if there isn't one.
-
newInstance
public PersistenceCapable newInstance(java.lang.Class pcClass, StateManager sm)
Create a new instance of the class and assign itsjdoStateManager
. The new instance has itsjdoFlags
set toLOAD_REQUIRED
.- Parameters:
pcClass
- thePersistenceCapable
class.sm
- theStateManager
which will own the new instance.- Returns:
- the new instance, or
null
if the class is not registered. - See Also:
PersistenceCapable.jdoNewInstance(StateManager sm)
-
newInstance
public PersistenceCapable newInstance(java.lang.Class pcClass, StateManager sm, java.lang.Object oid)
Create a new instance of the class and assign itsjdoStateManager
and key values from the ObjectId. If the oid parameter isnull
, no key values are copied. The new instance has itsjdoFlags
set toLOAD_REQUIRED
.- Parameters:
pcClass
- thePersistenceCapable
class.sm
- theStateManager
which will own the new instance.oid
- the ObjectId instance from which to copy key field values.- Returns:
- the new instance, or
null
if the class is not registered. - See Also:
PersistenceCapable.jdoNewInstance(StateManager sm, Object oid)
-
newObjectIdInstance
public java.lang.Object newObjectIdInstance(java.lang.Class pcClass)
Create a new instance of the ObjectId class of thisPersistenceCapable
class. It is intended only for application identity. This method should not be called for classes that use single field identity; newObjectIdInstance(Class, Object) should be used instead. If the class has been enhanced for datastore identity, or if the class is abstract, null is returned.- Parameters:
pcClass
- thePersistenceCapable
class.- Returns:
- the new ObjectId instance, or
null
if the class is not registered.
-
newObjectIdInstance
public java.lang.Object newObjectIdInstance(java.lang.Class pcClass, java.lang.Object obj)
Create a new instance of the class used by the parameter Class for JDO identity, using the key constructor of the object id class. It is intended for single field identity. The identity instance returned has no relationship with the values of the primary key fields of the persistence-capable instance on which the method is called. If the key is the wrong class for the object id class, null is returned.For classes that use single field identity, if the parameter is of one of the following types, the behavior must be as specified:
Number
orCharacter
: the parameter must be the single field type or the wrapper class of the primitive field type; the parameter is passed to the single field identity constructorObjectIdFieldSupplier
: the field value is fetched from theObjectIdFieldSupplier
and passed to the single field identity constructorString
: the String is passed to the single field identity constructor
- Parameters:
obj
- theObject
form of the object idpcClass
- thePersistenceCapable
class.- Returns:
- the new ObjectId instance, or
null
if the class is not registered. - Since:
- 2.0
-
copyKeyFieldsToObjectId
public void copyKeyFieldsToObjectId(java.lang.Class pcClass, PersistenceCapable.ObjectIdFieldSupplier fm, java.lang.Object oid)
Copy fields from an outside source to the key fields in the ObjectId. This method is generated in thePersistenceCapable
class to generate a call to the field manager for each key field in the ObjectId.For example, an ObjectId class that has three key fields (
int id
,String name
, andFloat salary
) would have the method generated:void jdoCopyKeyFieldsToObjectId (Object oid, ObjectIdFieldSupplier fm) {
oid.id = fm.fetchIntField (0);
oid.name = fm.fetchStringField (1);
oid.salary = fm.fetchObjectField (2);
}The implementation is responsible for implementing the
ObjectIdFieldSupplier
to provide the values for the key fields.- Parameters:
pcClass
- thePersistenceCapable Class
.oid
- the ObjectId target of the copy.fm
- the field manager that supplies the field values.
-
copyKeyFieldsFromObjectId
public void copyKeyFieldsFromObjectId(java.lang.Class pcClass, PersistenceCapable.ObjectIdFieldConsumer fm, java.lang.Object oid)
Copy fields to an outside source from the key fields in the ObjectId. This method is generated in thePersistenceCapable
class to generate a call to the field manager for each key field in the ObjectId. For example, an ObjectId class that has three key fields (int id
,String name
, andFloat salary
) would have the method generated:void jdoCopyKeyFieldsFromObjectId
(PersistenceCapable oid, ObjectIdFieldConsumer fm) {
fm.storeIntField (0, oid.id);
fm.storeStringField (1, oid.name);
fm.storeObjectField (2, oid.salary);
}The implementation is responsible for implementing the
ObjectIdFieldConsumer
to store the values for the key fields.- Parameters:
pcClass
- thePersistenceCapable
classoid
- the ObjectId source of the copy.fm
- the field manager that receives the field values.
-
registerClass
public static void registerClass(java.lang.Class pcClass, java.lang.String[] fieldNames, java.lang.Class[] fieldTypes, byte[] fieldFlags, java.lang.Class persistenceCapableSuperclass, PersistenceCapable pc)
Register metadata by class. The registration will be done in the class namedJDOImplHelper
loaded by the same or an ancestor class loader as thePersistenceCapable
class performing the registration.- Parameters:
pcClass
- thePersistenceCapable
class used as the key for lookup.fieldNames
- an array ofString
field names for persistent and transactional fieldsfieldTypes
- an array ofClass
field typesfieldFlags
- the Field Flags for persistent and transactional fieldspc
- an instance of thePersistenceCapable
classpersistenceCapableSuperclass
- the most immediate superclass that isPersistenceCapable
-
unregisterClasses
public void unregisterClasses(java.lang.ClassLoader cl)
Unregister metadata by class loader. This method unregisters all registeredPersistenceCapable
classes loaded by the specified class loader. Any attempt to get metadata for unregistered classes will result in aJDOFatalUserException
.- Parameters:
cl
- the class loader.- Since:
- 1.0.2
-
unregisterClass
public void unregisterClass(java.lang.Class pcClass)
Unregister metadata by class. This method unregisters the specified class. Any further attempt to get metadata for the specified class will result in aJDOFatalUserException
.- Parameters:
pcClass
- thePersistenceCapable
class to be unregistered.- Since:
- 1.0.2
-
addRegisterClassListener
public void addRegisterClassListener(RegisterClassListener crl)
Add the specifiedRegisterClassListener
to the listener list.- Parameters:
crl
- the listener to be added
-
removeRegisterClassListener
public void removeRegisterClassListener(RegisterClassListener crl)
Remove the specifiedRegisterClassListener
from the listener list.- Parameters:
crl
- the listener to be removed
-
getRegisteredClasses
public java.util.Collection getRegisteredClasses()
Returns a collection of class objects of the registered persistence-capable classes.- Returns:
- registered persistence-capable classes
-
getMeta
private static JDOImplHelper.Meta getMeta(java.lang.Class pcClass)
Look up the metadata for aPersistenceCapable
class.- Parameters:
pcClass
- theClass
.- Returns:
- the
Meta
for theClass
.
-
registerAuthorizedStateManagerClass
public static void registerAuthorizedStateManagerClass(java.lang.Class smClass) throws java.lang.SecurityException
Register a class authorized to replaceStateManager. The caller of this method must be authorized for JDOPermission("setStateManager"). During replaceStateManager, a persistence-capable class will call the corresponding checkAuthorizedStateManager and the class of the instance of the parameter must have been registered.- Parameters:
smClass
- a Class that is authorized for JDOPermission("setStateManager").- Throws:
java.lang.SecurityException
- if the caller is not authorized for JDOPermission("setStateManager").- Since:
- 1.0.1
-
registerAuthorizedStateManagerClasses
public static void registerAuthorizedStateManagerClasses(java.util.Collection smClasses) throws java.lang.SecurityException
Register classes authorized to replaceStateManager. The caller of this method must be authorized for JDOPermission("setStateManager"). During replaceStateManager, a persistence-capable class will call the corresponding checkAuthorizedStateManager and the class of the instance of the parameter must have been registered.- Parameters:
smClasses
- a Collection of Classes that are authorized for JDOPermission("setStateManager").- Throws:
java.lang.SecurityException
- if the caller is not authorized for JDOPermission("setStateManager").- Since:
- 1.0.1
-
registerDocumentBuilderFactory
public void registerDocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory factory)
Register a DocumentBuilderFactory instance for use in parsing the resource(s) META-INF/jdoconfig.xml. The default is governed by the semantics of DocumentBuilderFactory.newInstance().- Parameters:
factory
- the DocumentBuilderFactory instance to use- Since:
- 2.1
-
getRegisteredDocumentBuilderFactory
public static javax.xml.parsers.DocumentBuilderFactory getRegisteredDocumentBuilderFactory()
Return the registered instance of DocumentBuilderFactory.- Returns:
- the DocumentBuilderFactory if registered; null otherwise
- Since:
- 2.1
-
registerErrorHandler
public void registerErrorHandler(org.xml.sax.ErrorHandler handler)
Register an ErrorHandler instance for use in parsing the resource(s) META-INF/jdoconfig.xml. The default is an ErrorHandler that throws on error or fatalError and ignores warnings.- Parameters:
handler
- the ErrorHandler instance to use- Since:
- 2.1
-
getRegisteredErrorHandler
public static org.xml.sax.ErrorHandler getRegisteredErrorHandler()
Return the registered instance of ErrorHandler.- Returns:
- the registered ErrorHandler if registered; null otherwise
- Since:
- 2.1
-
checkAuthorizedStateManager
public static void checkAuthorizedStateManager(StateManager sm)
Check that the parameter instance is of a class that is authorized for JDOPermission("setStateManager"). This method is called by the replaceStateManager method in persistence-capable classes. A class that is passed as the parameter to replaceStateManager must be authorized for JDOPermission("setStateManager"). To improve performance, first the set of authorized classes is checked, and if not present, a regular permission check is made. The regular permission check requires that all callers on the stack, including the persistence-capable class itself, must be authorized for JDOPermission("setStateManager").- Parameters:
sm
- an instance of StateManager whose class is to be checked.- Since:
- 1.0.1
-
checkAuthorizedStateManagerClass
public static void checkAuthorizedStateManagerClass(java.lang.Class smClass)
Check that the parameter instance is a class that is authorized for JDOPermission("setStateManager"). This method is called by the constructors of JDO Reference Implementation classes.- Parameters:
smClass
- a Class to be checked for JDOPermission("setStateManager")- Since:
- 1.0.1
-
registerStringConstructor
public java.lang.Object registerStringConstructor(java.lang.Class cls, JDOImplHelper.StringConstructor sc)
Register special StringConstructor instances. These instances are for constructing instances from String parameters where there is no String constructor for them.- Parameters:
cls
- the class to register a StringConstructor forsc
- the StringConstructor instance- Returns:
- the previous StringConstructor registered for this class
-
getLocale
private static java.util.Locale getLocale(java.lang.String s)
Parse the String to a Locale.- Parameters:
s
- the name of the Locale- Returns:
- the Locale corresponding to the name
-
isClassLoadable
private static boolean isClassLoadable(java.lang.String className)
Determine if a class is loadable in the current environment.- Parameters:
className
- the fully-qualified name of the class- Returns:
- true if the class can be loaded; false otherwise
-
construct
public static java.lang.Object construct(java.lang.String className, java.lang.String keyString)
Construct an instance of the parameter class, using the keyString as an argument to the constructor. If the class has a StringConstructor instance registered, use it. If not, try to find a constructor for the class with a single String argument. Otherwise, throw a JDOUserException.- Parameters:
className
- the name of the classkeyString
- the String parameter for the constructor- Returns:
- the result of construction
-
getDateTimeInstance
static java.text.DateFormat getDateTimeInstance()
Get the DateFormat instance for the default locale from the VM. This requires the following privileges for JDOImplHelper in the security permissions file: permission java.util.PropertyPermission "user.country", "read"; permission java.util.PropertyPermission "user.timezone", "read,write"; permission java.util.PropertyPermission "java.home", "read"; If these permissions are not present, or there is some other problem getting the default date format, a simple formatter is returned.- Returns:
- the default date-time formatter
- Since:
- 2.1
-
registerDateFormat
public void registerDateFormat(java.text.DateFormat df)
Register a DateFormat instance for use with constructing Date instances. The default is the default DateFormat instance. If the new instance implements SimpleDateFormat, get its pattern for error messages.- Parameters:
df
- the DateFormat instance to use- Since:
- 2.0
-
addStateInterrogation
public void addStateInterrogation(StateInterrogation si)
Add a StateInterrogation to the list. Create a new list in case there is an iterator open on the original list.- Parameters:
si
- the StateInterrogation to add
-
removeStateInterrogation
public void removeStateInterrogation(StateInterrogation si)
Remove a StateInterrogation from the list. Create a new list in case there is an iterator open on the original list.- Parameters:
si
- the StateInterrogation to remove
-
getStateInterrogationIterator
private java.util.Iterator getStateInterrogationIterator()
Return an Iterator over all StateInterrogation instances. Synchronize to avoid add/remove/iterate conflicts.- Returns:
- an Iterator over all StateInterrogation instances.
-
nonBinaryCompatibleMakeDirty
public void nonBinaryCompatibleMakeDirty(java.lang.Object pc, java.lang.String fieldName)
Mark a non-binary-compatible instance dirty. Delegate to all registered StateInterrogation instances until one of them handles the call.- Parameters:
pc
- the instance to mark dirtyfieldName
- the field to mark dirty
-
nonBinaryCompatibleIs
public boolean nonBinaryCompatibleIs(java.lang.Object pc, JDOImplHelper.StateInterrogationBooleanReturn sibr)
Determine the state of a non-binary-compatible instance. Delegate to all registered StateInterrogation instances until one of them handles the call (returns a non-null Boolean with the answer). The caller provides the stateless "method object" that does the actual call to the StateInterrogation instance.- Parameters:
pc
- the instance to be checkedsibr
- the method object that delegates to the non-binary-compatible implementation- Returns:
- Boolean.TRUE if the instance satisfies the state interrogation; Boolean.FALSE if the instance does not satisfy the interrogation; or null if the implementation does not manage the class of the instance
-
nonBinaryCompatibleGet
public java.lang.Object nonBinaryCompatibleGet(java.lang.Object pc, JDOImplHelper.StateInterrogationObjectReturn sibr)
Return an object associated with a non-binary-compatible instance. Delegate to all registered StateInterrogation instances until one of them handles the call (returns a non-null answer). The caller provides the stateless "method object" that does the actual call to the StateInterrogation instance.- Parameters:
pc
- the instance whose associated object is neededsibr
- the method object that delegates to the non-binary-compatible implementation- Returns:
- the associated object or null if the implementation does not manage the class of the instance
-
-