ppt4j 1.0
 
Loading...
Searching...
No Matches
ppt4j.feature.java.JavaExtractor Class Reference
Inheritance diagram for ppt4j.feature.java.JavaExtractor:
ppt4j.feature.Extractor

Public Member Functions

 JavaExtractor (InputStream inputStream) throws IOException
 
 JavaExtractor (String path) throws IOException
 
 JavaExtractor (CtClass<?> clazz)
 
 JavaExtractor (ClassFactory factory, String className)
 
Features.SourceType getSourceType ()
 
void parse ()
 
Collection< JavaExtractorgetInnerClass ()
 
boolean isValidLine (int line)
 
int getLogicalLine (int line)
 
- Public Member Functions inherited from ppt4j.feature.Extractor
default void print ()
 
default void print (int line)
 
Map< Integer, FeaturesgetFeaturesMap ()
 
String getClassName ()
 

Static Public Member Functions

static JavaExtractor nil ()
 

Constructor & Destructor Documentation

◆ JavaExtractor() [1/4]

ppt4j.feature.java.JavaExtractor.JavaExtractor ( InputStream inputStream) throws IOException

◆ JavaExtractor() [2/4]

ppt4j.feature.java.JavaExtractor.JavaExtractor ( String path) throws IOException

◆ JavaExtractor() [3/4]

ppt4j.feature.java.JavaExtractor.JavaExtractor ( CtClass<?> clazz)

◆ JavaExtractor() [4/4]

ppt4j.feature.java.JavaExtractor.JavaExtractor ( ClassFactory factory,
String className )

Member Function Documentation

◆ getInnerClass()

Collection< JavaExtractor > ppt4j.feature.java.JavaExtractor.getInnerClass ( )

Returns a Collection of JavaExtractor instances representing the inner classes contained in this JavaExtractor.

Returns
a Collection of JavaExtractor instances representing the inner classes

◆ getLogicalLine()

int ppt4j.feature.java.JavaExtractor.getLogicalLine ( int line)

Retrieves the logical line number corresponding to the given physical line number. If the mapping does not exist, returns -1.

Parameters
linethe physical line number
Returns
the logical line number, or -1 if the mapping does not exist

◆ getSourceType()

Features.SourceType ppt4j.feature.java.JavaExtractor.getSourceType ( )

This method returns the source type of the Features class, which is always JAVA.

Returns
The source type of the Features class (always JAVA).

Implements ppt4j.feature.Extractor.

◆ isValidLine()

boolean ppt4j.feature.java.JavaExtractor.isValidLine ( int line)

Checks if the given line number is a valid line.

Parameters
linethe line number to be checked
Returns
true if the line number is valid, false otherwise

◆ nil()

static JavaExtractor ppt4j.feature.java.JavaExtractor.nil ( )
static

Creates and returns a new instance of JavaExtractor with default values. This method is used to create an instance of JavaExtractor when no specific parameters are needed.

Returns
a new instance of JavaExtractor with default values

◆ parse()

void ppt4j.feature.java.JavaExtractor.parse ( )

Parses the root element by iterating through its fields, elements, nested types, and inner classes. For each nested type that is a class, it creates a JavaExtractor object and adds it to the innerClasses map. For each anonymous inner class, it creates a JavaExtractor object and adds it to the innerClasses map. Finally, it recursively calls parse method on all inner classes and marks the root element as parsed.

Implements ppt4j.feature.Extractor.


The documentation for this class was generated from the following file: