com.sun.tdk.signaturetest.sigfile
Class SignatureClassLoader

java.lang.Object
  extended by com.sun.tdk.signaturetest.sigfile.SignatureClassLoader
All Implemented Interfaces:
Reader
Direct Known Subclasses:
F40Reader

public abstract class SignatureClassLoader
extends java.lang.Object
implements Reader

SignatureClassLoader implements input stream sequentially reading ClassDescription instances from signature file. This program merges several signature files into a single one.

See Also:
ClassDescription

Field Summary
protected  java.lang.String apiVersion
          API version found in this signature file.
protected  java.util.Set features
           
protected  Format format
           
protected  java.lang.String signatureFileFormat
          Sigfile format version found in this signature file.
 
Constructor Summary
protected SignatureClassLoader(Format format)
           
 
Method Summary
 void close()
           
protected abstract  java.util.List convertClassDefinitions(java.util.List definitions)
           
protected abstract  java.lang.String convertClassDescr(java.lang.String descr)
           
 java.util.Set getAllSupportedFeatures()
           
 java.lang.String getApiVersion()
           
protected abstract  Parser getParser()
           
 boolean hasFeature(FeaturesHolder.Feature feature)
           
protected  java.lang.String preprocessLine(java.lang.String currentLine)
           
protected  boolean readHeaders(java.io.BufferedReader in)
           
 ClassDescription readNextClass()
          Return the next SigFileClassDescription read from this signature file.
 boolean readSignatureFile(java.net.URL fileURL)
          Open fileURL for input, and parse comments to initialize fields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

format

protected Format format

features

protected java.util.Set features

apiVersion

protected java.lang.String apiVersion
API version found in this signature file.


signatureFileFormat

protected java.lang.String signatureFileFormat
Sigfile format version found in this signature file.

Constructor Detail

SignatureClassLoader

protected SignatureClassLoader(Format format)
Method Detail

getParser

protected abstract Parser getParser()

hasFeature

public boolean hasFeature(FeaturesHolder.Feature feature)
Specified by:
hasFeature in interface Reader

getAllSupportedFeatures

public java.util.Set getAllSupportedFeatures()
Specified by:
getAllSupportedFeatures in interface Reader

close

public void close()
           throws java.io.IOException
Specified by:
close in interface Reader
Throws:
java.io.IOException

readNextClass

public ClassDescription readNextClass()
                               throws java.io.IOException
Return the next SigFileClassDescription read from this signature file.

Specified by:
readNextClass in interface Reader
Throws:
java.io.IOException
See Also:
ClassDescription

preprocessLine

protected java.lang.String preprocessLine(java.lang.String currentLine)

convertClassDescr

protected abstract java.lang.String convertClassDescr(java.lang.String descr)

convertClassDefinitions

protected abstract java.util.List convertClassDefinitions(java.util.List definitions)

readSignatureFile

public boolean readSignatureFile(java.net.URL fileURL)
                          throws java.io.IOException
Open fileURL for input, and parse comments to initialize fields

Specified by:
readSignatureFile in interface Reader
Throws:
java.io.IOException

readHeaders

protected boolean readHeaders(java.io.BufferedReader in)
                       throws java.io.IOException
Throws:
java.io.IOException

getApiVersion

public java.lang.String getApiVersion()
Specified by:
getApiVersion in interface Reader