jltools.util
Class TypeEncoder
java.lang.Object
|
+--jltools.util.TypeEncoder
- public class TypeEncoder
- extends java.lang.Object
The TypeEncoder
gives the ability to encode a jltools
Type
as a Java string.
It uses a form of serialization to encode the Type
into
a byte stream and then converts the byte stream to a standard Java string.
The difference between the encoder and a normal serialization process is
that in order to encode this type, we need to sever any links to other types
in the current environment. So any ClassType
other than the
the type being encoded is replaced in the stream with an
AmbiguousType
that contains the fully qualified name.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ts
protected TypeSystem ts
zip
protected final boolean zip
test
protected final boolean test
TypeEncoder
public TypeEncoder(TypeSystem ts)
encode
public java.lang.String encode(Type t)
throws java.io.IOException
decode
public Type decode(java.lang.String s)
throws java.io.IOException,
java.lang.ClassNotFoundException