Package org.aspectj.weaver

Examples of org.aspectj.weaver.WeaverStateInfo$Entry


        } else {
      throw new RuntimeException("unimplemented");
    }
   
    if (changed && munger.changesPublicSignature()) {
      WeaverStateInfo info =
        weaver.getLazyClassGen().getOrCreateWeaverStateInfo(BcelClassWeaver.getReweavableMode());
      info.addConcreteMunger(this);
    }

    if (changed && worthReporting) {
      if (munger.getKind().equals(ResolvedTypeMunger.Parent)) {
          AsmRelationshipProvider.getDefault().addRelationship(weaver.getLazyClassGen().getType(), munger,getAspectType());
View Full Code Here


    }
   
    public byte [] getJavaClassBytesIncludingReweavable(BcelWorld world){
        writeBack(world);
        byte [] wovenClassFileData = myGen.getJavaClass().getBytes();
        WeaverStateInfo wsi = myType.getWeaverState();//getOrCreateWeaverStateInfo();
        if(wsi != null && wsi.isReweavable()){ // && !reweavableDataInserted
            //reweavableDataInserted = true;
            return wsi.replaceKeyWithDiff(wovenClassFileData);
        } else{
            return wovenClassFileData;
        }
    }
View Full Code Here

    if (myType.getWeaverState()==null) return null;
    return myType.getWeaverState().getAspectsAffectingType();
  }
   
  public WeaverStateInfo getOrCreateWeaverStateInfo(boolean inReweavableMode) {
    WeaverStateInfo ret = myType.getWeaverState();
    if (ret != null) return ret;
    ret = new WeaverStateInfo(inReweavableMode);
    myType.setWeaverState(ret);
    return ret;
  }
View Full Code Here

   
    // AMC we shouldn't need this when generic sigs are fixed??
    if (onType.isRawType()) onType = onType.getGenericType();

    WeaverStateInfo info = onType.getWeaverState();
   
    // this test isnt quite right - there will be a case where we fail to flag a problem
    // with a 'dangerous interface' because the type is reweavable when we should have
    // because the type wasn't going to be rewoven... if that happens, we should perhaps
    // move this test and dangerous interface processing to the end of this method and
    // make it conditional on whether any of the typeMungers passed into here actually
    // matched this type.
    if (info != null && !info.isOldStyle()   && !info.isReweavable()) {
      processTypeMungersFromExistingWeaverState(sourceType,onType);
      CompilationAndWeavingContext.leavingPhase(tok);
      return;
    }

    // Check if the type we are looking at is the topMostImplementor of a dangerous interface -
    // report a problem if it is.
    for (Iterator i = dangerousInterfaces.entrySet().iterator(); i.hasNext();) {
      Map.Entry entry = (Map.Entry) i.next();
      ResolvedType interfaceType = (ResolvedType)entry.getKey();
      if (onType.isTopmostImplementor(interfaceType)) {
        factory.showMessage(IMessage.ERROR,
          onType + ": " + entry.getValue(),
          onType.getSourceLocation(), null);
      }
    }
   
    boolean needOldStyleWarning = (info != null && info.isOldStyle());
   
    onType.clearInterTypeMungers();
   
    // FIXME asc perf Could optimize here, after processing the expected set of types we may bring
    // binary types that are not exposed to the weaver, there is no need to attempt declare parents
View Full Code Here

                    for (TestMethod testMethod : inputTestData.getTestMethod()) {
                        List<TestRecord> originalTestRecords = testMethod.getTestRecord();
                        for (TestRecord originalTestRecord : originalTestRecords) {
                            if (originalTestRecord.getId().equals(testRecord.get(RECORD_POSITION))) {
                                OutputData outputData = new OutputData();
                                Entry outputEntry = new Entry();
                                outputEntry.setKey(ACTUAL_RESULT);
                                outputEntry.setValue(testRecord.get(ACTUAL_RESULT).toString());
                                outputData.getEntry().add(outputEntry);
                                originalTestRecord.setOutputData(outputData);
                                outputDataAdded = true;
                                break;
                            }
View Full Code Here

                    for (TestMethod testMethod : inputTestData.getTestMethod()) {
                        List<TestRecord> originalTestRecords = testMethod.getTestRecord();
                        for (TestRecord originalTestRecord : originalTestRecords) {
                            if (originalTestRecord.getId().equals(testRecord.get(RECORD_POSITION))) {
                                OutputData outputData = new OutputData();
                                Entry outputEntry = new Entry();
                                outputEntry.setKey(ACTUAL_RESULT);
                                outputEntry.setValue(testRecord.get(ACTUAL_RESULT).toString());
                                Entry durationEntry = new Entry();
                                durationEntry.setKey(DURATION);
                                durationEntry.setValue(testRecord.get(DURATION).toString());
                                outputData.getEntry().add(outputEntry);
                                outputData.getEntry().add(durationEntry);
                                if(testRecord.get(TEST_STATUS) != null){
                                    Entry statusEntry = new Entry();
                                    statusEntry.setKey(TEST_STATUS);
                                    statusEntry.setValue(testRecord.get(TEST_STATUS).toString());
                                    outputData.getEntry().add(statusEntry);
                                }
                               
                               
                                originalTestRecord.setOutputData(outputData);
                                outputDataAdded = true;
                                break;
                            }
                        }
                        if (outputDataAdded) {
                            break;
                        }
                    }
                }else{
                    //Method did not return any data. So only write the duration as output
                    for (TestMethod testMethod : inputTestData.getTestMethod()) {
                        List<TestRecord> originalTestRecords = testMethod.getTestRecord();
                        for (TestRecord originalTestRecord : originalTestRecords) {
                            if (originalTestRecord.getId().equals(testRecord.get(RECORD_POSITION))) {
                                OutputData outputData = new OutputData();
                                Entry durationEntry = new Entry();
                                durationEntry.setKey(DURATION);
                                durationEntry.setValue(testRecord.get(DURATION).toString());
                                outputData.getEntry().add(durationEntry);
                                originalTestRecord.setOutputData(outputData);
                                outputDataAdded = true;
                                break;
                            }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.WeaverStateInfo$Entry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.