- 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 Strings. The results returned as included as an instance of
'this' class. There are a series of
Vector'sthat contain lists of
class Method, class Constructorand 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.
- 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 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.
- 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: