|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.frontend.goals.AbstractGoal
public abstract class AbstractGoal
An AbstractGoal
is the base class of most Goal
implementations.
Field Summary | |
---|---|
protected java.util.Set |
corequisites
|
protected Job |
job
|
protected java.lang.String |
name
|
protected java.util.Set |
prerequisites
|
protected int |
state
|
Fields inherited from interface polyglot.frontend.goals.Goal |
---|
ATTEMPTED, REACHED, RUNNING, UNREACHABLE, UNREACHABLE_THIS_RUN, UNREACHED |
Constructor Summary | |
---|---|
protected |
AbstractGoal(Job job)
|
protected |
AbstractGoal(Job job,
java.lang.String name)
|
Method Summary | |
---|---|
void |
addCorequisiteGoal(Goal g,
Scheduler scheduler)
Add a new corequisite subgoal g . |
void |
addPrerequisiteGoal(Goal g,
Scheduler scheduler)
Add a new subgoal g . |
protected void |
checkCycles(Goal current,
Scheduler scheduler)
|
boolean |
conflictsWith(Goal goal)
Return true if this goal conflicts with the other; that is passes running over both goals could access the same data. |
java.util.Collection |
corequisiteGoals(Scheduler scheduler)
Goals on which this goal may mutually depend. |
abstract Pass |
createPass(ExtensionInfo extInfo)
Creates a pass to attempt to satisfy the goal. |
boolean |
equals(java.lang.Object o)
|
boolean |
hasBeenReached()
Return true if this goal has been reached. |
int |
hashCode()
|
boolean |
isReachable()
Return true if this goal is reachable. |
Job |
job()
Get the job associated with this goal, or null. |
java.lang.String |
name()
Get the name of the goal for debugging. |
java.util.Collection |
prerequisiteGoals(Scheduler scheduler)
Goals that must be completed before attempting this goal. |
void |
setState(int state)
|
void |
setUnreachable()
Set a flag indicating that this rule is unreachable. |
void |
setUnreachableThisRun()
Mark the goal as reached or not reached. |
int |
state()
|
protected java.lang.String |
stateString()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Job job
protected java.lang.String name
protected int state
protected java.util.Set corequisites
protected java.util.Set prerequisites
Constructor Detail |
---|
protected AbstractGoal(Job job)
protected AbstractGoal(Job job, java.lang.String name)
Method Detail |
---|
public boolean conflictsWith(Goal goal)
conflictsWith
in interface Goal
public abstract Pass createPass(ExtensionInfo extInfo)
createPass
in interface Goal
public java.lang.String name()
Goal
name
in interface Goal
public Job job()
Goal
job
in interface Goal
public java.util.Collection prerequisiteGoals(Scheduler scheduler)
Goal
prerequisiteGoals
in interface Goal
public java.util.Collection corequisiteGoals(Scheduler scheduler)
Goal
corequisiteGoals
in interface Goal
public void addPrerequisiteGoal(Goal g, Scheduler scheduler) throws CyclicDependencyException
Goal
g
. g
must be completed
before this goal is attempted. g
should be interned.
addPrerequisiteGoal
in interface Goal
CyclicDependencyException
- if a prerequisite of g
is this
protected void checkCycles(Goal current, Scheduler scheduler) throws CyclicDependencyException
CyclicDependencyException
public void addCorequisiteGoal(Goal g, Scheduler scheduler)
Goal
g
. g
is a
goal on which this goal mutually depends. The caller must be careful
to ensure that all corequisite goals can be eventually reached.
g
should be interned.
addCorequisiteGoal
in interface Goal
public void setUnreachableThisRun()
setUnreachableThisRun
in interface Goal
public int state()
state
in interface Goal
public void setState(int state)
setState
in interface Goal
public boolean hasBeenReached()
Goal
hasBeenReached
in interface Goal
public void setUnreachable()
Goal
setUnreachable
in interface Goal
public boolean isReachable()
Goal
isReachable
in interface Goal
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected java.lang.String stateString()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |