Package org.exolab.castor.xml.util
Interface ResolverStrategy
- All Known Implementing Classes:
CastorXMLStrategy
public interface ResolverStrategy
A resolver strategy implements how ClassDescriptor's are found for a
given class. It uses multiple ResolveCommand's for first time resolution,
but also some caching of already evaluated classes.
- Since:
- 1.2
- Version:
- $Revision$ $Date$
- Author:
- Joachim Grueneis
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
As a strategy generate one or more class descriptors it needs a place to put the results to. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
To set the class loader property for resolving.static final String
To set the introspector property for resolving.static final String
To set the LoadPackageMappings property for resolving.static final String
To set the mapping loader property for resolving.static final String
To set the use introspection property for resolving. -
Method Summary
Modifier and TypeMethodDescriptionresolveClass
(ResolverStrategy.ResolverResults resolverResults, String className) Implementes a strategy how a class is resolved into a list of class descriptors.void
resolvePackage
(ResolverStrategy.ResolverResults resolverResults, String packageName) Implementes a strategy how a package is resolved into a list of class descriptors.void
setProperty
(String key, Object value) To set properties for strategy and/or commands.
-
Field Details
-
PROPERTY_CLASS_LOADER
To set the class loader property for resolving.- See Also:
-
PROPERTY_USE_INTROSPECTION
To set the use introspection property for resolving.- See Also:
-
PROPERTY_INTROSPECTOR
To set the introspector property for resolving.- See Also:
-
PROPERTY_LOAD_PACKAGE_MAPPINGS
To set the LoadPackageMappings property for resolving.- See Also:
-
PROPERTY_MAPPING_LOADER
To set the mapping loader property for resolving.- See Also:
-
-
Method Details
-
setProperty
To set properties for strategy and/or commands.- Parameters:
key
- name of the propertyvalue
- value the property is set to
-
resolveClass
ClassDescriptor resolveClass(ResolverStrategy.ResolverResults resolverResults, String className) throws ResolverException Implementes a strategy how a class is resolved into a list of class descriptors.- Parameters:
resolverResults
- to put the resolver reszlts intoclassName
- the class to resolve- Returns:
- the ClassDescriptor for the class or null if the class couldn't be resolved
- Throws:
ResolverException
- in case that resolving fails fatally
-
resolvePackage
void resolvePackage(ResolverStrategy.ResolverResults resolverResults, String packageName) throws ResolverException Implementes a strategy how a package is resolved into a list of class descriptors.- Parameters:
resolverResults
- to put the resolver reszlts intopackageName
- the package to resolve- Throws:
ResolverException
- in case that resolving fails fatally
-