setParseContext(context); parsePhaseBuildDom(); List<ProcessingPhase> phases = new ArrayList<ProcessingPhase>(8);  phases.add(new RegisterPrototypesProcessor());  phases.add(new ImportProcessor());  phases.add(ExtractReferenceOperation.createPhase());  phases.add(new ExtendsProcessor());  if(Constants.POLICY_DEBUG_RELEASE) { phases.add(VerifyExtendsComplete.createPhase()); }  phases.add(new EarlyReferenceProcessor());   String currentPhase = ""; try { for (ProcessingPhase phase : phases) { currentPhase = phase.toString(); phase.process(this); } } catch (CdlException e) { e.addDetailText(Constants.QNAME_DETAIL_PHASE, currentPhase); e.addDetail(getRoot(), true); throw e; }
List<ProcessingPhase> phases = createPhaseList(false); parseAndApplyPhases(context, phases);
    public void parse(ParseContext context) throws CdlException, IOException,            ParsingException {        setParseContext(context);        parsePhaseBuildDom();        List<ProcessingPhase> phases = new ArrayList<ProcessingPhase>(8);        //register the protos        phases.add(new RegisterPrototypesProcessor());        //imports        phases.add(new ImportProcessor());        //extract all reference bindings        phases.add(ExtractReferenceOperation.createPhase());        //do the extends processing        phases.add(new ExtendsProcessor());        //debug builds and a sanity check        if(Constants.POLICY_DEBUG_RELEASE) {            phases.add(VerifyExtendsComplete.createPhase());        }        //now do early references        phases.add(new EarlyReferenceProcessor());        //list is full, so execute.        String currentPhase = "";        try {            for (ProcessingPhase phase : phases) {                currentPhase = phase.toString();                phase.process(this);            }        } catch (CdlException e) {            e.addDetailText(Constants.QNAME_DETAIL_PHASE, currentPhase);            e.addDetail(getRoot(), true);            throw e;        }    }