spki
Class LocObjFactory

java.lang.Object
  |
  +--spki.LocObjFactory

public final class LocObjFactory
extends Object

SPKI LocObjFactory utilityclass.

Version:
$Id: LocObjFactory.java,v 1.1 2002/06/24 18:07:41 tep Exp $
Author:
Tep Narula <tep@win.trlabs.ca>
See Also:
LocObj

Field Summary
private static String __ME
          This class's full name.
 
Constructor Summary
private LocObjFactory()
          Can't instantiate me.
 
Method Summary
static LocObj getInstance(SExpression sexp)
          Get an instance of a LocObj from given S-Expression.
static boolean isLocObj(SExpression sexp)
          Check an SExpression to see if it could contain a LocObj.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

__ME

private static final String __ME
This class's full name.
Constructor Detail

LocObjFactory

private LocObjFactory()
Can't instantiate me. This is a tool class, we don't want a constructor!
Method Detail

getInstance

public static final LocObj getInstance(SExpression sexp)
                                throws ParseException,
                                       SPKIException
Get an instance of a LocObj from given S-Expression.
Parameters:
sexp - the SExpression containing a LocObj.
Returns:
An object instance implementing LocObj.
Throws:
ParseException - if the argument doesn't contain a LocObj.
SPKIException - if something went wrong.

isLocObj

public static final boolean isLocObj(SExpression sexp)
Check an SExpression to see if it could contain a LocObj. It's a convenient utility function that checks whether the given SExpressions is an SList that has a matching type-name as one of those classes implementing the LocObj interface.
Returns:
true if given SExpression could contain be a LocObj, false otherwise.