org.aspectj.ajdt.internal.core.builder
Class StatefulNameEnvironment

java.lang.Object
  extended by org.aspectj.ajdt.internal.core.builder.StatefulNameEnvironment
All Implemented Interfaces:
INameEnvironment

public class StatefulNameEnvironment
extends java.lang.Object
implements INameEnvironment


Constructor Summary
StatefulNameEnvironment(INameEnvironment baseEnvironment, java.util.Map classesFromName, AjState state)
           
 
Method Summary
 void cleanup()
          This method cleans the environment uo.
 NameEnvironmentAnswer findType(char[][] compoundName)
          Find a type with the given compound name.
 NameEnvironmentAnswer findType(char[] typeName, char[][] packageName)
          Find a type named in the package .
 boolean isPackage(char[][] parentPackageName, char[] packageName)
          Answer whether packageName is the name of a known subpackage inside the package parentPackageName.
 void update(java.util.Map classNameToFileMap, java.util.Set added)
          Needs to be told about changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatefulNameEnvironment

public StatefulNameEnvironment(INameEnvironment baseEnvironment,
                               java.util.Map classesFromName,
                               AjState state)
Method Detail

cleanup

public void cleanup()
Description copied from interface: INameEnvironment
This method cleans the environment uo. It is responsible for releasing the memory and freeing resources. Passed that point, the name environment is no longer usable. A name environment can have a long life cycle, therefore it is the responsibility of the code which created it to decide when it is a good time to clean it up.

Specified by:
cleanup in interface INameEnvironment

findType

public NameEnvironmentAnswer findType(char[] typeName,
                                      char[][] packageName)
Description copied from interface: INameEnvironment
Find a type named in the package . Answer the binary form of the type if it is known to be consistent. Otherwise, answer the compilation unit which defines the type or null if the type does not exist. The default package is indicated by char[0][]. It is known that the package containing the type exists. NOTE: This method can be used to find a member type using its internal name A$B, but the source file for A is answered if the binary file is inconsistent.

Specified by:
findType in interface INameEnvironment

findType

public NameEnvironmentAnswer findType(char[][] compoundName)
Description copied from interface: INameEnvironment
Find a type with the given compound name. Answer the binary form of the type if it is known to be consistent. Otherwise, answer the compilation unit which defines the type or null if the type does not exist. Types in the default package are specified as {{typeName}}. It is unknown whether the package containing the type actually exists. NOTE: This method can be used to find a member type using its internal name A$B, but the source file for A is answered if the binary file is inconsistent.

Specified by:
findType in interface INameEnvironment

isPackage

public boolean isPackage(char[][] parentPackageName,
                         char[] packageName)
Description copied from interface: INameEnvironment
Answer whether packageName is the name of a known subpackage inside the package parentPackageName. A top level package is found relative to null. The default package is always assumed to exist. For example: isPackage({{java}, {awt}}, {event}); isPackage(null, {java});

Specified by:
isPackage in interface INameEnvironment

update

public void update(java.util.Map classNameToFileMap,
                   java.util.Set added)
Needs to be told about changes. The 'added' set is a subset of classNameToFileMap consisting of just those names added during this build - to reduce any impact on incremental compilation times.