package accrue.analysis.ext;

import polyglot.ast.AbstractExtFactory_c;
import polyglot.ast.Ext;
import polyglot.ast.ExtFactory;

public class AnalysisExtFactory_c extends AbstractExtFactory_c implements
        AnalysisExtFactory {
    public AnalysisExtFactory_c(ExtFactory nextExtFactory) {
        super(nextExtFactory);
    }

    public AnalysisExtFactory_c() {
        super();
    }

    @Override
    protected Ext extNodeImpl() {
        return new AccrueExt_c();
    }

    @Override
    protected Ext extDoImpl() {
        return new ExtDo();
    }

    @Override
    protected Ext extLabeledImpl() {
        return new ExtLabeled();
    }

    @Override
    protected Ext extSwitchImpl() {
        return new ExtSwitch();
    }

    @Override
    protected Ext extTermImpl() {
        return new ExtTerm();
    }

    @Override
    protected Ext extBranchImpl() {
        return new ExtBranch();
    }

    @Override
    protected Ext extAssertImpl() {
        return new ExtAssert();
    }

    @Override
    protected Ext extEmptyImpl() {
        return new ExtEmpty();
    }

    @Override
    protected Ext extSynchronizedImpl() {
        return new ExtSynchronized();
    }

    @Override
    protected Ext extFormalImpl() {
        return new ExtFormal();
    }

    @Override
    protected Ext extCallImpl() {
        return new ExtCall();
    }

    @Override
    protected Ext extNewImpl() {
        return new ExtNew();
    }

    @Override
    protected Ext extNewArrayImpl() {
        return new ExtNewArray();
    }

    @Override
    protected Ext extArrayInitImpl() {
        return new ExtArrayInit();
    }

    @Override
    protected Ext extArrayAccessImpl() {
        return new ExtArrayAccess();
    }

    @Override
    protected Ext extBinaryImpl() {
        return new ExtBinary();
    }

    @Override
    protected Ext extInstanceofImpl() {
        return new ExtInstanceof();
    }

    @Override
    protected Ext extUnaryImpl() {
        return new ExtUnary();
    }

    @Override
    protected Ext extBlockImpl() {
        return new ExtBlock();
    }

    @Override
    protected Ext extSwitchBlockImpl() {
        return new ExtBlock();
    }

    @Override
    protected Ext extIfImpl() {
        return new ExtIf();
    }

    @Override
    protected Ext extWhileImpl() {
        return new ExtWhile();
    }

    @Override
    protected Ext extCastImpl() {
        return new ExtCast();
    }

    @Override
    protected Ext extCatchImpl() {
        return new ExtCatch();
    }

    @Override
    protected Ext extMethodDeclImpl() {
        return new ExtMethodDecl();
    }

    @Override
    protected Ext extInitializerImpl() {
        return new ExtInitializer();
    }

    @Override
    protected Ext extConstructorDeclImpl() {
        return new ExtConstructorDecl();
    }

    @Override
    protected Ext extConstructorCallImpl() {
        return new ExtConstructorCall();
    }

    @Override
    protected Ext extConditionalImpl() {
        return new ExtConditional();
    }

    @Override
    protected Ext extSpecialImpl() {
        return new ExtSpecial();
    }

    @Override
    protected Ext extEvalImpl() {
        return new ExtEval();
    }

    @Override
    protected Ext extExprImpl() {
        return new ExtExpr();
    }

    @Override
    protected Ext extLocalImpl() {
        return new ExtLocal();
    }

    @Override
    protected Ext extLocalDeclImpl() {
        return new ExtLocalDecl();
    }

    @Override
    protected Ext extFieldDeclImpl() {
        return new ExtFieldDecl();
    }

    @Override
    protected Ext extThrowImpl() {
        return new ExtThrow();
    }

    @Override
    protected Ext extTryImpl() {
        return new ExtTry();
    }

    @Override
    protected Ext extReturnImpl() {
        return new ExtReturn();
    }

    @Override
    protected Ext extFieldImpl() {
        return new ExtField();
    }

    @Override
    protected Ext extFieldAssignImpl() {
        return new ExtFieldAssign();
    }

    @Override
    protected Ext extArrayAccessAssignImpl() {
        return new ExtArrayAccessAssign();
    }

    @Override
    protected Ext extLocalAssignImpl() {
        return new ExtLocalAssign();
    }

    @Override
    protected Ext extTypeNodeImpl() {
        return new ExtTypeNode();
    }

    @Override
    protected Ext extLitImpl() {
        return new ExtLit();
    }

    @Override
    public Ext extSuppress() {
        Ext e = extSuppressImpl();

        if (nextExtFactory() != null
                && nextExtFactory() instanceof AnalysisExtFactory) {
            Ext e2 = ((AnalysisExtFactory) nextExtFactory()).extSuppress();
            e = composeExts(e, e2);
        }
        return postExtSuppress(e);
    }

    protected Ext extSuppressImpl() {
        return new ExtSuppress();
    }

    protected Ext postExtSuppress(Ext e) {
        return e;
    }

}
