Package org.aspectj.weaver

Examples of org.aspectj.weaver.BCException


      return il;
    }

    if (fromType.equals(Type.VOID)) {
      if (toType instanceof BasicType) {
        throw new BCException("attempting to cast from void to basic type");
      }
      il.append(InstructionFactory.createNull(Type.OBJECT));
      return il;
    }
View Full Code Here


    try {
      testingParseCounter++;
      ClassParser parser = new ClassParser(new ByteArrayInputStream(bytes), filename);
      return parser.parse();
    } catch (IOException e) {
      throw new BCException("malformed class file");
    }
  }
View Full Code Here

    }
    ih.removeAllTargeters();
    try {
      il.delete(ih);
    } catch (TargetLostException e) {
      throw new BCException("this really can't happen");
    }
  }
View Full Code Here

      Var var = shadow.getWithinAnnotationVar(annotationType);

      // This should not happen, we shouldn't have gotten this far
      // if we weren't going to find the annotation
      if (var == null) {
        throw new BCException("Impossible! annotation=[" + annotationType + "]  shadow=[" + shadow + " at "
            + shadow.getSourceLocation() + "]    pointcut is at [" + getSourceLocation() + "]");
      }

      state.set(btp.getFormalIndex(), var);
    }
View Full Code Here

  }

  public static TypePattern readTypePattern150(VersionedDataInputStream s, ISourceContext context) throws IOException {
    byte version = s.readByte();
    if (version > EXACT_VERSION) {
      throw new BCException("ExactTypePattern was written by a more recent version of AspectJ");
    }
    TypePattern ret = new ExactTypePattern(s.isAtLeast169() ? s.readSignatureAsUnresolvedType() : UnresolvedType.read(s), s
        .readBoolean(), s.readBoolean());
    ret.setAnnotationTypePattern(AnnotationTypePattern.read(s, context));
    ret.setTypeParameters(TypePatternList.read(s, context));
View Full Code Here

    return buff.toString();
  }

  @Override
  public TypePattern resolveBindings(IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType) {
    throw new BCException("trying to re-resolve");

  }
View Full Code Here

    if (fromTheMap != null && !(fromTheMap instanceof ReferenceType)) {
      // what on earth is it then? See pr 112243
      StringBuffer exceptionText = new StringBuffer();
      exceptionText.append("Found invalid (not a ReferenceType) entry in the type map. ");
      exceptionText.append("Signature=[" + signature + "] Found=[" + fromTheMap + "] Class=[" + fromTheMap.getClass() + "]");
      throw new BCException(exceptionText.toString());
    }

    ReferenceType nameTypeX = (ReferenceType) fromTheMap;

    if (nameTypeX == null) {
View Full Code Here

    if (fromTheMap != null && !(fromTheMap instanceof ReferenceType)) {
      // what on earth is it then? See pr 112243
      StringBuffer exceptionText = new StringBuffer();
      exceptionText.append("Found invalid (not a ReferenceType) entry in the type map. ");
      exceptionText.append("Signature=[" + signature + "] Found=[" + fromTheMap + "] Class=[" + fromTheMap.getClass() + "]");
      throw new BCException(exceptionText.toString());
    }

    ReferenceType nameTypeX = (ReferenceType) fromTheMap;

    if (nameTypeX == null) {
View Full Code Here

      // NEWARRAY arrayInstruction = (NEWARRAY)i;
      Type ot = i.getType();
      UnresolvedType ut = fromBcel(ot);
      retval = MemberImpl.method(ut, Modifier.PUBLIC, UnresolvedType.VOID, "<init>", new ResolvedType[] { INT });
    } else {
      throw new BCException("Cannot create array construction signature for this non-array instruction:" + i);
    }
    return retval;
  }
View Full Code Here

        }
      } else if (a instanceof AjAttribute.WeaverVersionInfo) {
        // Set the weaver version used to build this type
        wvInfo = (AjAttribute.WeaverVersionInfo) a;
      } else {
        throw new BCException("bad attribute " + a);
      }
    }
    return deferredAspectAttribute;
  }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.BCException

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.