spki
Class PrincipalFactory
java.lang.Object
|
+--spki.PrincipalFactory
- public final class PrincipalFactory
- extends Object
SPKI PrincipalFactory utility class.
- Version:
- $Id: PrincipalFactory.java,v 1.2 2002/07/02 19:31:01 tep Exp $
- Author:
- Tep Narula <tep@win.trlabs.ca>
- See Also:
Principal
|
Field Summary |
private static String |
__ME
This class's full name. |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
__ME
private static final String __ME
- This class's full name.
PrincipalFactory
private PrincipalFactory()
- Can't instantiate me.
Thsi is a tool class, we don't want to create an instance!
isPrincipal
public static final boolean isPrincipal(SExpression sexp)
- Check an SExpression to see if it could contain a principal.
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 that are considered principal.
- Parameters:
sexp - the SExpression to check.- Returns:
- true if given SExpression could contain be a principal,
false otherwise.
getInstance
public static final Principal getInstance(SExpression sexp)
throws SPKIException,
ParseException
- Get an instance of principal from given S-Expression.
- Parameters:
sexp - the SExpression to check.- Returns:
- an instance of spki.interfaces.Principal.
- Throws:
- ParseException - if the argument doesn't contain a principal.
- SPKIException - if something went wrong.