codec.asn1
Class ClassInstanceResolver
java.lang.Object
|
+--codec.asn1.ClassInstanceResolver
- All Implemented Interfaces:
- Resolver
- public class ClassInstanceResolver
- extends Object
- implements Resolver
Resolves requests for instances based on a class object. New instances are
generated by invoking newInstance()
on the wrapped class
object. The class must provide a no-arg default constructor.
- Version:
- "$Id: ClassInstanceResolver.java,v 1.2 2000/12/06 17:47:27 vroth Exp $"
- Author:
- Volker Roth
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassInstanceResolver
public ClassInstanceResolver(Class factory)
- Creates an instance with the given factory class.
- Parameters:
factory - The factory class.- Throws:
IllegalArgumentException - if factory has no default constructor, or
does not implement
ASN1Type.
getFactoryClass
public Class getFactoryClass()
- Returns the class object of the factory class.
- Returns:
- The class object.
resolve
public ASN1Type resolve(ASN1Type caller)
throws ResolverException
- Resolves the call by returning a new instance of the the factory class.
The factory class must have been specified at the time of constructing
this instance.
- Specified by:
resolve in interface Resolver
- Parameters:
caller - The caller. The caller is ignored.- Throws:
ResolverException - if for some reason the call cannot be resolved.
Copyright © Fraunhofer Gesellschaft. All Rights Reserved.