Package gnu.expr
Class CatchClause
- java.lang.Object
-
- gnu.mapping.PropertySet
-
- gnu.mapping.Procedure
-
- gnu.expr.Expression
-
- gnu.expr.ScopeExp
-
- gnu.expr.LetExp
-
- gnu.expr.CatchClause
-
- All Implemented Interfaces:
gnu.kawa.format.Printable
,Named
,SourceLocator
,SourceLocator
,Locator
public class CatchClause extends LetExp
A "catch" clause of a "try-catch" form.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface gnu.text.SourceLocator
SourceLocator.Simple
-
-
Field Summary
-
Fields inherited from class gnu.expr.LetExp
IS_BODY_SCOPE
-
Fields inherited from class gnu.expr.Expression
applyMethodExpression, flags, NEXT_AVAIL_FLAG, noExpressions, type, VALIDATED
-
Fields inherited from class gnu.mapping.Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
-
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
-
Constructor Summary
Constructors Constructor Description CatchClause()
CatchClause(Declaration decl, Expression body)
CatchClause(LambdaExp lexp)
"Convert" aLambdaExp
to aCatchClause
.CatchClause(Object name, Type type, Expression body)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compile(Compilation comp, Target target)
protected Object
evalVariable(Declaration decl, CallContext ctx)
Expression
getBody()
CatchClause
getNext()
protected boolean
mustCompile()
void
print(gnu.kawa.io.OutPort out)
void
setBody(Expression body)
void
setNext(CatchClause next)
protected <R,D>
voidvisitChildren(ExpVisitor<R,D> visitor, D d)
-
Methods inherited from class gnu.expr.LetExp
apply, calculateType, print, visit, visitInitializers
-
Methods inherited from class gnu.expr.ScopeExp
add, add, addDeclaration, addDeclaration, addDeclaration, clearCallList, countDecls, currentLambda, currentModule, duplicateDeclarationError, firstDecl, getDefine, getNoDefine, getOuter, getVarScope, isClassGenerated, lastDecl, lookup, lookup, nestedIn, nesting, popScope, remove, remove, replaceFollowing, setIndexes, setOuter, topLevel, toString
-
Methods inherited from class gnu.expr.Expression
applyMethodExpression, checkLiteralKeyword, compile, compile, compileWithPosition, compileWithPosition, deepCopy, deepCopy, deepCopy, deepCopy, eval, eval, getColumnNumber, getEndColumn, getEndLine, getFileName, getFlag, getFlags, getLineNumber, getPublicId, getStartColumn, getStartLine, getSystemId, getType, getTypeRaw, isSingleValue, isStableSourceLocation, makeWhile, maybeSetLine, neverReturns, numArgs, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, setLine, setLocation, setType, side_effects, validateApply, valueIfConstant
-
Methods inherited from class gnu.mapping.Procedure
apply0, apply1, apply2, apply3, apply4, applyL, applyN, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSetter, getSourceLocation, isSideEffectFree, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation
-
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
-
-
-
Constructor Detail
-
CatchClause
public CatchClause()
-
CatchClause
public CatchClause(Declaration decl, Expression body)
-
CatchClause
public CatchClause(Object name, Type type, Expression body)
-
CatchClause
public CatchClause(LambdaExp lexp)
"Convert" aLambdaExp
to aCatchClause
.
-
-
Method Detail
-
getNext
public final CatchClause getNext()
-
setNext
public final void setNext(CatchClause next)
-
getBody
public final Expression getBody()
-
setBody
public final void setBody(Expression body)
-
mustCompile
protected boolean mustCompile()
- Overrides:
mustCompile
in classLetExp
-
evalVariable
protected Object evalVariable(Declaration decl, CallContext ctx) throws Throwable
- Overrides:
evalVariable
in classLetExp
- Throws:
Throwable
-
compile
public void compile(Compilation comp, Target target)
-
visitChildren
protected <R,D> void visitChildren(ExpVisitor<R,D> visitor, D d)
- Overrides:
visitChildren
in classLetExp
-
-