public interface Resolver
A lazy resolver would resolve an object given its identifier. The reference to the object will be
created with a ResolvableReference object using the resolved and the identifier. When the
object is requested, the resolve(java.lang.String) method will be called to obtain it.
Some implementation will add and remove resolvable objects, e.g. a collection of objects that
also acts as a resolver. These methods should implement addResolvable(java.lang.String, org.exolab.castor.xml.schema.Referable) and
removeResolvable(java.lang.String). Resolvers that do not implement these methods are still considered
valid resolvers. For example, a database based resolver will operate consistently without
implementing add/remove not through the database interface.
ResolvableReference| Modifier and Type | Method and Description |
|---|---|
void |
addResolvable(String id,
Referable referent)
Adds a resolvable object to this resolver identified by id.
|
void |
removeResolvable(String id)
Removes a resolvable object from this resolver.
|
Referable |
resolve(String id)
Called to resolve a reference give the reference's identifier.
|
Referable resolve(String id)
id - The identifier to resolvevoid addResolvable(String id, Referable referent)
resolve(java.lang.String) with the same id will return referent.id - The referent's identifierreferent - The referent objectvoid removeResolvable(String id)
resolve(java.lang.String) with the
same id will return null.id - The referent's identifierCopyright © 2016. All rights reserved.