Package jamopp.parser.jdt.singlefile
Class JaMoPPJDTSingleFileParser
java.lang.Object
jamopp.parser.jdt.singlefile.JaMoPPJDTSingleFileParser
- All Implemented Interfaces:
JaMoPPParserAPI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]findClasspathEntries(Path directory) String[]findSources(Path directory) parse(String fileName, InputStream input) Reads an InputStream and parses its content into a Java model instance.parseDirectory(Path dir) Visits all files and directories in a directory and parses all found Java source files.Reads a file and parses its content into a Java model instance.voidvoidsetExclusionPatterns(String... patterns) voidSets the ResourceSet that is used to create Resources if new Resource instances are needed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jamopp.parser.api.JaMoPPParserAPI
parseUri
-
Constructor Details
-
JaMoPPJDTSingleFileParser
public JaMoPPJDTSingleFileParser()
-
-
Method Details
-
setExclusionPatterns
-
parse
Description copied from interface:JaMoPPParserAPIReads an InputStream and parses its content into a Java model instance.- Specified by:
parsein interfaceJaMoPPParserAPI- Parameters:
fileName- name of the Java source file which will be read.input- the InputStream to read.- Returns:
- the created Java model instance or null if the InputStream could not be read.
-
parseFile
Description copied from interface:JaMoPPParserAPIReads a file and parses its content into a Java model instance.- Specified by:
parseFilein interfaceJaMoPPParserAPI- Parameters:
file- the Java source file.- Returns:
- the created Java model instance contained in its associated Resource instance or null if the file could not be read.
-
parseDirectory
Description copied from interface:JaMoPPParserAPIVisits all files and directories in a directory and parses all found Java source files. It is assumed that the given directory is a Java source folder containing sub-directories representing a Java package hierarchy.- Specified by:
parseDirectoryin interfaceJaMoPPParserAPI- Parameters:
dir- the directory to search for Java source files.- Returns:
- a ResourceSet containing all parsed source files with their associated Resources.
-
findSources
- Throws:
IOException
-
findClasspathEntries
- Throws:
IOException
-
resolveBindings
public void resolveBindings() -
setResourceSet
Description copied from interface:JaMoPPParserAPISets the ResourceSet that is used to create Resources if new Resource instances are needed. If no ResourceSet is provided, a ResourceSet is created.- Specified by:
setResourceSetin interfaceJaMoPPParserAPI- Parameters:
set- the ResourceSet.
-