- All Implemented Interfaces:
public class JavaSourceCodeFile extends ParsedFile implements java.io.Serializable
Java Parser Bridge, Java Source Code File - Documentation.
This class is capable of parsing a java-source file, and returning the parse results as a series of
String's.The parse-results are returned as an instance of
'this'class. There are a series of
Vector'sthat contain lists of
Method's, Constructor'sand also
There is a Java-Parser Library that is required to use this Package. The Java Doc Upgrader Package / Tool will not work without this
'.jar'file being placed in your
'.jar'is available here:
There is a book available and an internet "Gitter" support web-site chat-room with some of the people involved in writing this library. There are quite a number of available jars in the "Master Jar Distribution" - but the core library jar is fully sufficient for running the tasks needed by this Java-Doc Upgrade Tool's logic.
Below is the Inheritance Diagram for the two File-Parser Classes. Both of these classes (in the diagram) parse into an identical set of class-fields. The parsers, themselves, though achieve this through two very different means. One class is derived from a
'.html'file, and the other a
In order to retrieve Java
String's- and perform the syntax hiliting needed to insert them into the JavaDoc Web-Pages, both of these parsers are needed to do an upgrade.
- See Also:
- Serialized Form
- View Here: Torello/HTML/Tools/JavaDoc/JavaSourceCodeFile.java
- Open New Browser-Tab: Torello/HTML/Tools/JavaDoc/JavaSourceCodeFile.java
Nested Class Summary
Nested Classes Modifier and Type Class
All Methods Static Methods Concrete Methods Modifier and Type Method
parse(String javaSrcFileAsString, String javaSrcFileName, String name, CIET ciet)
Methods inherited from class Torello.HTML.Tools.JavaDoc.ParsedFile
addConstructor, addField, addMethod, findConstructor, findField, findMethod, getConstructor, getConstructors, getConstructors, getField, getFields, getFields, getGenericParameters, getMethod, getMethods, getMethods, numConstructors, numFields, numMethods, toString, toString
public static final long serialVersionUIDThis fulfils the SerialVersion UID requirement for all classes that implement Java's
interface java.io.Serializable. Using the
SerializableImplementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.
- See Also:
- Constant Field Values
- Exact Field Declaration Expression:
public static void main(java.lang.String argv) throws java.lang.Exception
- Exact Method Body:
public static JavaSourceCodeFile parse (java.lang.String javaSrcFileAsString, java.lang.String javaSrcFileName, java.lang.String name, CIET ciet) throws SourceCodeParseExceptionThis will parse a java source-code file, and retrieve details about the
fieldsfound by the
IMPORTANT NOTE: Before any of the classes in this package
JavaParserBridgewill successfully compile with user's code, the JAR-File for the JavaParser must first be downloaded. Although any programmer who wishes to explore further the API that this package provides, only a portion of the entire parser package is necessary. There are quite a few jar-files available, but the only one necessary to implement the classes in
package JavaParserBridgeare available for download via a link at the top of this class, and also in the package summary page.
javaSrcFileAsString- This may be any valid java source-code file which has already been retrieved from disk, or elsewhere. If this is not a valid java source file (as a
String), the results that occur are based on how the underlying jar file handles it. Please consult the JavaParser.org website for more details.
javaSrcFileName- This is required in the case that an exception has thrown. If any exceptions throw, then this
Stringwill be included with the internal data of the thrown exception. This will, perhaps, make error checking and debugging easier.
name- This is the un-qualified name of the
CIET. If this class is an inner-class, the enclosing class name is included. Package-Name information is not included.
- An instance of this class. The instance will have had it's result-
Vectorsfilled with the appropriate
SourceCodeParseException- If while processing and reading the '.java' source-code file there are any problems parsing and converting the file that cause an exception, this exception will "wrap" the underlying exception. For more information about what has gone wrong, use the
'SourceCodeParseException.getCause()'method. Also, this exception provides a
public final String 'javaSrcFileName'that details which file was being processed when the original exception was thrown.
- Exact Method Body: