|
|||||||||
| 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 Goalpublic abstract Pass createPass(ExtensionInfo extInfo)
createPass in interface Goalpublic java.lang.String name()
Goal
name in interface Goalpublic Job job()
Goal
job in interface Goalpublic java.util.Collection prerequisiteGoals(Scheduler scheduler)
Goal
prerequisiteGoals in interface Goalpublic java.util.Collection corequisiteGoals(Scheduler scheduler)
Goal
corequisiteGoals in interface Goal
public void addPrerequisiteGoal(Goal g,
Scheduler scheduler)
throws CyclicDependencyException
Goalg. g must be completed
before this goal is attempted. g should be interned.
addPrerequisiteGoal in interface GoalCyclicDependencyException - if a prerequisite of g is this
protected void checkCycles(Goal current,
Scheduler scheduler)
throws CyclicDependencyException
CyclicDependencyException
public void addCorequisiteGoal(Goal g,
Scheduler scheduler)
Goalg. 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 Goalpublic void setUnreachableThisRun()
setUnreachableThisRun in interface Goalpublic int state()
state in interface Goalpublic void setState(int state)
setState in interface Goalpublic boolean hasBeenReached()
Goal
hasBeenReached in interface Goalpublic void setUnreachable()
Goal
setUnreachable in interface Goalpublic boolean isReachable()
Goal
isReachable in interface Goalpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected 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 | ||||||||