Stanse  -1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cz.muni.stanse.codestructures.Unit Class Referenceabstract

Holds all the relevant data about the code in one compilation unit (usually a file). More...

Inheritance diagram for cz.muni.stanse.codestructures.Unit:
Inheritance graph
[legend]
Collaboration diagram for cz.muni.stanse.codestructures.Unit:
Collaboration graph
[legend]

Public Member Functions

 Unit (File file, InputStream stream)
 
 Unit (File file) throws IOException
 
String getName ()
 
synchronized void drop ()
 
abstract void parse () throws ParserException
 
Map< String, String > getAliases ()
 

Protected Member Functions

 Unit ()
 
Document getXMLDocument ()
 
List< CFGHandlegetCFGHandles ()
 
CFG getCFG (String functionName)
 

Protected Attributes

File fileName
 
InputStream stream
 
Document xmlDocument
 
List< CFGHandleCFGHs = null
 
List< CFGCFGs = null
 
boolean available = false
 
Map< String, String > aliases = null
 

Detailed Description

Holds all the relevant data about the code in one compilation unit (usually a file).

This is intended to be a language-independent superclass. For a concrete language create an appropriate subclass. The constructor calls the appropriate parser and fills the CFG and AST structures.

Constructor & Destructor Documentation

cz.muni.stanse.codestructures.Unit.Unit ( )
inlineprotected

Intentionally empty, called by derived class constructors.

cz.muni.stanse.codestructures.Unit.Unit ( File  file,
InputStream  stream 
)
inline

Calls the appropriate parser(s) to fill in the data members.

Parameters
fileName of the unit. Needs to be supplied explicitly, because it is not derivable from a stream.
streamStream to read the compilation unit from.
Exceptions
IOExceptionIf there any problems with IO.
ParserExceptionIn case of parsing problems not related to IO.
cz.muni.stanse.codestructures.Unit.Unit ( File  file) throws IOException
inline

Calls the appropriate parser(s) to fill in the data members.

Parameters
fileName of the file containing the compilation unit.
Exceptions
IOExceptionIf there any problems with IO.
ParserExceptionIn case of parsing problems not related to IO.

Member Function Documentation

synchronized void cz.muni.stanse.codestructures.Unit.drop ( )
inline
Map<String, String> cz.muni.stanse.codestructures.Unit.getAliases ( )
inline
CFG cz.muni.stanse.codestructures.Unit.getCFG ( String  functionName)
inlineprotected
List<CFGHandle> cz.muni.stanse.codestructures.Unit.getCFGHandles ( )
inlineprotected
Returns
Unmodifiable list of CFGs in this compilation unit.
String cz.muni.stanse.codestructures.Unit.getName ( )
inline
Document cz.muni.stanse.codestructures.Unit.getXMLDocument ( )
inlineprotected
abstract void cz.muni.stanse.codestructures.Unit.parse ( ) throws ParserException
abstract

Member Data Documentation

Map<String, String> cz.muni.stanse.codestructures.Unit.aliases = null
protected

A mapping from machine-readable names to human-readable ones.

boolean cz.muni.stanse.codestructures.Unit.available = false
protected

Already available/parsed?

List<CFGHandle> cz.muni.stanse.codestructures.Unit.CFGHs = null
protected

List of units control flow graphs.

List<CFG> cz.muni.stanse.codestructures.Unit.CFGs = null
protected
File cz.muni.stanse.codestructures.Unit.fileName
protected

Name of the unit

InputStream cz.muni.stanse.codestructures.Unit.stream
protected

Stream to read from

Document cz.muni.stanse.codestructures.Unit.xmlDocument
protected

XML representation of the unit's AST


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