com.togethersoft.sca.ast
Interface AstModel


public interface AstModel

The AST model is the root element of a Java project representation. It comprises the top-level packages that contains subpackages, compilation units, and class files. The AST model also provides search facilities.


Method Summary
 void addModelChangeListener(AstModelChangeListener listener)
          Registeres a listener that will reveive notifications about model updates.
 AstPackage findPackage(java.lang.String name)
          Returns the top-level package with the specified name.
 AstType findType(java.lang.String name)
          Returns the type with the specified name.
 AstPackage getDefaultPackage()
          Returns the default package.
 AstPackage[] getPackages()
          Returns the top-level packages in this model, including the default package.
 void removeModelChangeListener(AstModelChangeListener listener)
          Removes a model change listener.
 

Method Detail

addModelChangeListener

public void addModelChangeListener(AstModelChangeListener listener)
Registeres a listener that will reveive notifications about model updates.

findPackage

public AstPackage findPackage(java.lang.String name)
Returns the top-level package with the specified name. Returns null, if the package with the specified name does not exist.
Parameters:
name - specifies fully qualified name of the package, for example "java/lang".
Returns:
the package with the specified name.

findType

public AstType findType(java.lang.String name)
Returns the type with the specified name. The type may be either top-level or inner type. Returns null, if the type with the specified name does not exist.
Parameters:
name - specifies fully qualified name of the type, for example "java/lang/String".
Returns:
the type with the specified name.

getDefaultPackage

public AstPackage getDefaultPackage()
Returns the default package. The default package always exists in the model.
Returns:
the default package.

getPackages

public AstPackage[] getPackages()
Returns the top-level packages in this model, including the default package.
Returns:
the top-level packages.

removeModelChangeListener

public void removeModelChangeListener(AstModelChangeListener listener)
Removes a model change listener.