net.sf.plb4jedit.plb
Class Include

java.lang.Object
  extended bynet.sf.plb4jedit.plb.Include

public class Include
extends Object

Represents a plb include. Keeps track of the objects of interest in an include, which are global accessible variable and label definitions and a list of other included includes.
Instances should be received by the IncludeCache, so there is no public constructor.

Author:
Peter Schaefer

Constructor Summary
protected Include(String absolutePath)
          constructs an Include object from the file specified by its absolute path.
 
Method Summary
 Map getGlobalLabels()
           
 Map getGlobalVariables()
           
 List getIncs()
           
static Include getInstance(String absolutePath)
          gives access to Include Instances via an IncludeCache.
static void main(String[] args)
          main method for testing purpose.
Constructs an include object for the given absolute path as first command line argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Include

protected Include(String absolutePath)
           throws FileNotFoundException,
                  IOException
constructs an Include object from the file specified by its absolute path.
Take advantage of include caching and get instances via getInstance!

Parameters:
absolutePath - to the location of an include
Throws:
FileNotFoundException - if a File specified by absolutePath can not be instantiated
IOException - if a File specified by absolutePath can not be instantiated
Method Detail

getInstance

public static Include getInstance(String absolutePath)
                           throws FileNotFoundException,
                                  IOException
gives access to Include Instances via an IncludeCache.

Parameters:
absolutePath - to the location of an include
Returns:
Throws:
FileNotFoundException
IOException

main

public static void main(String[] args)
                 throws FileNotFoundException,
                        IOException
main method for testing purpose.
Constructs an include object for the given absolute path as first command line argument. Prints out all incs, vars and labels found in the include.

Parameters:
args - absolute path to an include.
Throws:
FileNotFoundException
IOException

getGlobalLabels

public Map getGlobalLabels()
Returns:
a map of all global Labels of this include

getGlobalVariables

public Map getGlobalVariables()
Returns:
a map of all global variables of this include

getIncs

public List getIncs()
Returns:
a list of all includes included in this include


Copyright © 2003 Riege Software Internationl. All Rights Reserved.