|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.simpleframework.xml.transform.RegistryMatcher
public class RegistryMatcher
The RegistryMatcher provides a simple matcher backed
by a registry. Registration can be done to match a type to a
Transform class or instance. If a transform class is
registered an instance of it is created when requested using the
default no argument constructor of the type, it is then cached so
it can be reused on future requests.
Persister| Constructor Summary | |
|---|---|
RegistryMatcher()
Constructor for the RegistryMatcher. |
|
| Method Summary | |
|---|---|
void |
bind(java.lang.Class type,
java.lang.Class transform)
This is used to bind a Transform type. |
void |
bind(java.lang.Class type,
Transform transform)
This is used to bind a Transform instance to the
specified type. |
Transform |
match(java.lang.Class type)
This is used to match a Transform using the type
specified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RegistryMatcher()
RegistryMatcher. This is used
to create a matcher instance that can resolve a transform by
type and can also instantiate new transforms if required. It
is essentially a convenience implementation.
| Method Detail |
|---|
public void bind(java.lang.Class type,
java.lang.Class transform)
Transform type. The first
time a transform is requested for the specified type a new
instance of this Transform will be instantiated.
type - this is the type to resolve the transform fortransform - this is the transform type to instantiate
public void bind(java.lang.Class type,
Transform transform)
Transform instance to the
specified type. Each time a transform is requested for this
type the provided instance will be returned.
type - this is the type to resolve the transform fortransform - this transform instance to be used
public Transform match(java.lang.Class type)
throws java.lang.Exception
Transform using the type
specified. If no transform can be acquired then this returns
a null value indicating that no transform could be found.
match in interface Matchertype - this is the type to acquire the transform for
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||