View Javadoc
1 package jsdsi; 2 3 import jsdsi.sexp.SexpList; 4 import jsdsi.sexp.SexpParseException; 5 6 /*** 7 * An element of a Sequence. 8 * 9 * @see Sequence 10 * 11 * @author Sameer Ajmani 12 * @version $Revision: 1.1.6.1 $ $Date: 2005/11/08 03:12:52 $ 13 */ 14 public interface Element { 15 public SexpList toSexp(); 16 17 static class Default { 18 static Element parseElement(SexpList l) throws SexpParseException { 19 String type = l.getType(); 20 21 if (type.equals("signature")) 22 return Signature.parseSignature(l); 23 if (type.equals("cert")) 24 return Cert.parseCert(l); 25 if (type.equals("do")) 26 return Op.parseOp(l); 27 if (type.equals("public-key")) 28 return PublicKey.parsePublicKey(l); 29 30 throw new SexpParseException( 31 "unrecognized sequence element type: " + type); 32 } 33 } 34 }

This page was automatically generated by Maven