public abstract class OnUnit
extends java.lang.Object
Condition
sConstructor and Description |
---|
OnUnit(Condition.CONDITION theCONDITION,
Condition theCondition,
java.lang.String... info)
constructor - define but do not activate this OnUnit with certain identifying
info at the point of the ON statement.
|
OnUnit(Condition.CONDITION theCONDITION,
IPLIFile theFile,
java.lang.String... info)
constructor - define but do not activate this OnUnit with certain identifying
info at the point of the ON statement.
|
OnUnit(Condition.CONDITION theCONDITION,
java.lang.String... info)
constructor - define but do not activate this OnUnit with certain identifying
info at the point of the ON statement.
|
Modifier and Type | Method and Description |
---|---|
Condition.CONDITION |
getCondition()
getter for the
Condition for which this OnUnit applies. |
IPLIFile |
getFile()
getter for the subject file to which this OnUnit applies.
|
java.lang.String[] |
getInfo()
getter for the optional information retained about this condition or on-unit
|
boolean |
getSnap()
getter for the snap indicator.
|
Condition |
getUserCondition()
getter for the user defined
Condition variable to which this OnUnit applies. |
abstract void |
handler(Condition _condition)
handler - must define a handler for this ON unit which is the
code defined within an ON statement for handling the condition.
|
OnUnit |
onStatement(boolean snap)
onStatement - activate an OnUnit with an ON statement.
|
OnUnit |
resignalStatement()
resignalStatement - raise the condition associated with this ON unit
thus invoking the handler defined for it, as with a RESIGNAL statement
Do not override.
|
OnUnit |
revertStatement()
revertStatement - when an ON unit block falls out of scope or
with an explicit REVERT statement, revert to the previous
action for this OnUnit.
|
OnUnit |
signalStatement()
signalStatement - raise the condition associated with this ON unit
thus invoking the handler defined for it, as with a SIGNAL statement
Do not override.
|
java.lang.String |
toString()
return information about this on unit
|
public OnUnit(Condition.CONDITION theCONDITION, java.lang.String... info)
theCONDITION
- - the CONDITION to which this OnUnit appliesinfo
- - String[] info about the OnUnit (optional)public OnUnit(Condition.CONDITION theCONDITION, IPLIFile theFile, java.lang.String... info)
theCONDITION
- - the CONDITION to which this OnUnit appliestheFile
- - the subject of the ON statement for those that have them
(e.g., "ON ENDFILE(MYFILE) BEGIN;...END;")info
- - String[] info about the OnUnit (optional)public OnUnit(Condition.CONDITION theCONDITION, Condition theCondition, java.lang.String... info)
theCONDITION
- - the CONDITION to which this OnUnit appliestheCondition
- - the user defined Condition
variable
of the ON statement for those that have them
(e.g., "ON CONDITION(MYCONDVAR) BEGIN;...END;")info
- - String[] info about the OnUnit (optional)public abstract void handler(Condition _condition)
_condition
- - the Condition
to be handledpublic final OnUnit onStatement(boolean snap)
snap
- - boolean indicating SNAP keyword was specified
Do not override.public final OnUnit revertStatement()
public final OnUnit signalStatement()
public final OnUnit resignalStatement()
public Condition.CONDITION getCondition()
Condition
for which this OnUnit applies.public IPLIFile getFile()
public java.lang.String[] getInfo()
public Condition getUserCondition()
Condition
variable to which this OnUnit applies.public boolean getSnap()
public java.lang.String toString()
toString
in class java.lang.Object