javassist.expr.Handler Java Examples

The following examples show how to use javassist.expr.Handler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Matcher.java    From ModTheSpire with MIT License 5 votes vote down vote up
public boolean match(Expr toMatch) {
    Handler expr = (Handler) toMatch;

    boolean result = false;

    try {
        result = expr.getType().getName().equals(exceptionType) &&
                expr.isFinally() == isFinallyClause;
    } catch (NotFoundException e) {
        // this is allowed to happen so eat it
    }

    return result;
}
 
Example #2
Source File: MatchFinderExprEditor.java    From ModTheSpire with MIT License 4 votes vote down vote up
@Override
public void edit(Handler expr) {
    doMatch(Expectation.CATCH_CLAUSE, expr);
}