org.openide.compiler
Interface Compilable

All Known Implementing Classes:
CompilerJob, Compiler

public interface Compilable

Basic interface that defines the object that can be compiled. Each such object has to hold a set of its dependencies and also a set of Compilers that should be used to compile it.

The semantics says that before the Compilers can run all other Compileable objects that this one depends on must already be compiled.

The third important method of Compileable is that it should have equals method overriden to correctly recognize all other compileable objects that represents the same compilation. But *WITHOUT* checking


Field Summary
static Mutex MUTEX
          Mutex to synchronize in adding/changing and reading dependencies between compilable objects.
 
Method Summary
 Collection compilers()
          A collection of all compilers that have to be compiled to finish compilation of this Compilable
 Collection dependsOn()
          A collection of other Compilable objects that have to be finished before the compilers of this Compilable can be started.
 boolean equals(Object other)
          Equal method should be implemented to return true for all Compilable objects that are "compiled in the same way" but ignoring their dependencies.
 

Field Detail

MUTEX

public static final Mutex MUTEX
Mutex to synchronize in adding/changing and reading dependencies between compilable objects. When a dependency that influence result of dependsOn method is changing the thread should first request MUTEX.readAccess to do it. So when someone wants to construct the tree of all dependencies (like CompilationEngine) it can aquire MUTEX.writeAccess and it should be guaranteed that no modification to dependsOn method occures.
Method Detail

compilers

public Collection compilers()
A collection of all compilers that have to be compiled to finish compilation of this Compilable
Returns:
collection of Compiler

dependsOn

public Collection dependsOn()
A collection of other Compilable objects that have to be finished before the compilers of this Compilable can be started.
Returns:
collection of Compilable

equals

public boolean equals(Object other)
Equal method should be implemented to return true for all Compilable objects that are "compiled in the same way" but ignoring their dependencies.
Overrides:
equals in class Object
Parameters:
other - the other object
Returns:
true if both look like equal


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.