Package org.aspectj.apache.bcel.classfile.annotation

Examples of org.aspectj.apache.bcel.classfile.annotation.ClassElementValue


          // do we have a defaultImpl=xxx.class (ie implementation)
          String defaultImplClassName = null;
          NameValuePair defaultImplNVP = getAnnotationElement(decp, "defaultImpl");
          if (defaultImplNVP != null) {
            ClassElementValue defaultImpl = (ClassElementValue) defaultImplNVP.getValue();
            defaultImplClassName = UnresolvedType.forSignature(defaultImpl.getClassString()).getName();
            if (defaultImplClassName.equals("org.aspectj.lang.annotation.DeclareParents")) {
              defaultImplClassName = null;
            } else {
              // check public no arg ctor
              ResolvedType impl = struct.enclosingType.getWorld().resolve(defaultImplClassName, false);
View Full Code Here


    if (interfaceListSpecified != null) {
      ArrayElementValue arrayOfInterfaceTypes = (ArrayElementValue) interfaceListSpecified.getValue();
      int numberOfTypes = arrayOfInterfaceTypes.getElementValuesArraySize();
      ElementValue[] theTypes = arrayOfInterfaceTypes.getElementValuesArray();
      for (int i = 0; i < numberOfTypes; i++) {
        ClassElementValue interfaceType = (ClassElementValue) theTypes[i];
        // Check: needs to be resolvable
        // TODO crappy replace required
        ResolvedType ajInterfaceType = UnresolvedType.forSignature(interfaceType.getClassString().replace("/", "."))
            .resolve(world);
        if (ajInterfaceType.isMissing() || !ajInterfaceType.isInterface()) {
          reportError(
              "Types listed in the 'interfaces' DeclareMixin annotation value must be valid interfaces. This is invalid: "
                  + ajInterfaceType.getName(), struct); // TODO better error location, use the method position
View Full Code Here

          // do we have a defaultImpl=xxx.class (ie implementation)
          String defaultImplClassName = null;
          NameValuePair defaultImplNVP = getAnnotationElement(decp, "defaultImpl");
          if (defaultImplNVP != null) {
            ClassElementValue defaultImpl = (ClassElementValue) defaultImplNVP.getValue();
            defaultImplClassName = UnresolvedType.forSignature(defaultImpl.getClassString()).getName();
            if (defaultImplClassName.equals("org.aspectj.lang.annotation.DeclareParents")) {
              defaultImplClassName = null;
            } else {
              // check public no arg ctor
              ResolvedType impl = struct.enclosingType.getWorld().resolve(defaultImplClassName, false);
View Full Code Here

    if (interfaceListSpecified != null) {
      ArrayElementValue arrayOfInterfaceTypes = (ArrayElementValue) interfaceListSpecified.getValue();
      int numberOfTypes = arrayOfInterfaceTypes.getElementValuesArraySize();
      ElementValue[] theTypes = arrayOfInterfaceTypes.getElementValuesArray();
      for (int i = 0; i < numberOfTypes; i++) {
        ClassElementValue interfaceType = (ClassElementValue) theTypes[i];
        // Check: needs to be resolvable
        // TODO crappy replace required
        ResolvedType ajInterfaceType = UnresolvedType.forSignature(interfaceType.getClassString().replace("/", "."))
            .resolve(world);
        if (ajInterfaceType.isMissing() || !ajInterfaceType.isInterface()) {
          reportError(
              "Types listed in the 'interfaces' DeclareMixin annotation value must be valid interfaces. This is invalid: "
                  + ajInterfaceType.getName(), struct); // TODO better error location, use the method position
View Full Code Here

          // do we have a defaultImpl=xxx.class (ie implementation)
          String defaultImplClassName = null;
          NameValuePair defaultImplNVP = getAnnotationElement(decp, "defaultImpl");
          if (defaultImplNVP != null) {
            ClassElementValue defaultImpl = (ClassElementValue) defaultImplNVP.getValue();
            defaultImplClassName = UnresolvedType.forSignature(defaultImpl.getClassString()).getName();
            if (defaultImplClassName.equals("org.aspectj.lang.annotation.DeclareParents")) {
              defaultImplClassName = null;
            } else {
              // check public no arg ctor
              ResolvedType impl = struct.enclosingType.getWorld().resolve(defaultImplClassName, false);
View Full Code Here

    if (interfaceListSpecified != null) {
      ArrayElementValue arrayOfInterfaceTypes = (ArrayElementValue) interfaceListSpecified.getValue();
      int numberOfTypes = arrayOfInterfaceTypes.getElementValuesArraySize();
      ElementValue[] theTypes = arrayOfInterfaceTypes.getElementValuesArray();
      for (int i = 0; i < numberOfTypes; i++) {
        ClassElementValue interfaceType = (ClassElementValue) theTypes[i];
        // Check: needs to be resolvable
        // TODO crappy replace required
        ResolvedType ajInterfaceType = UnresolvedType.forSignature(interfaceType.getClassString().replace("/", "."))
            .resolve(world);
        if (ajInterfaceType.isMissing() || !ajInterfaceType.isInterface()) {
          reportError(
              "Types listed in the 'interfaces' DeclareMixin annotation value must be valid interfaces. This is invalid: "
                  + ajInterfaceType.getName(), struct); // TODO better error location, use the method position
View Full Code Here

                    // do we have a defaultImpl=xxx.class (ie implementation)
                    String defaultImplClassName = null;
                    ElementNameValuePair defaultImplNVP = getAnnotationElement(decp, "defaultImpl");
                    if (defaultImplNVP != null) {
                        ClassElementValue defaultImpl = (ClassElementValue) defaultImplNVP.getValue();
                        defaultImplClassName = UnresolvedType.forSignature(defaultImpl.getClassString()).getName();
                        if (defaultImplClassName.equals("org.aspectj.lang.annotation.DeclareParents")) {
                            defaultImplClassName = null;
                        } else {
                            // check public no arg ctor
                            ResolvedType impl = struct.enclosingType.getWorld().resolve(
View Full Code Here

 
  /**
   * Return immutable variant of this ClassElementValueGen
   */
  public ElementValue getElementValue() {
    return new ClassElementValue(type,idx,cpGen.getConstantPool());
  }
View Full Code Here

TOP

Related Classes of org.aspectj.apache.bcel.classfile.annotation.ClassElementValue

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.