Examples of TypeRef


Examples of aQute.bnd.osgi.Descriptors.TypeRef

      if (o instanceof Assoc && ((Assoc) o).tag == 12) {
        referTo(((Assoc) o).b, 0); // Descriptor
      } else if (o instanceof ClassConstant) {
        String binaryClassName = (String) pool[((ClassConstant) o).cname];
        TypeRef typeRef = analyzer.getTypeRef(binaryClassName);
        referTo(typeRef, 0);
      }
    }

    /*
 
View Full Code Here

Examples of aQute.bnd.osgi.Descriptors.TypeRef

    int cIndex = in.readShort();
    int mIndex = in.readShort();

    if (cd != null) {
      int nameIndex = intPool[cIndex];
      TypeRef cName = analyzer.getTypeRef((String) pool[nameIndex]);

      String mName = null;
      String mDescriptor = null;

      if (mIndex != 0) {
View Full Code Here

Examples of aQute.bnd.osgi.Descriptors.TypeRef

      int outer_class_info_index = in.readShort();
      int inner_name_index = in.readShort();
      int inner_class_access_flags = in.readShort() & 0xFFFF;

      if (cd != null) {
        TypeRef innerClass = null;
        TypeRef outerClass = null;
        String innerName = null;

        if (inner_class_info_index != 0) {
          int nameIndex = intPool[inner_class_info_index];
          innerClass = analyzer.getTypeRef((String) pool[nameIndex]);
View Full Code Here

Examples of aQute.bnd.osgi.Descriptors.TypeRef

      int index = in.readUnsignedShort();
      if (api != null && (Modifier.isPublic(access_flags) || Modifier.isProtected(access_flags))) {
        ClassConstant cc = (ClassConstant) pool[index];
        String descr = (String) pool[cc.cname];

        TypeRef clazz = analyzer.getTypeRef(descr);
        referTo(clazz, access_flags);
      }
    }
  }
View Full Code Here

Examples of aQute.bnd.osgi.Descriptors.TypeRef

          if ((methodref == forName || methodref == class$) && lastReference != -1
              && pool[intPool[lastReference]] instanceof String) {
            String fqn = (String) pool[intPool[lastReference]];
            if (!fqn.equals("class") && fqn.indexOf('.') > 0) {
              TypeRef clazz = analyzer.getTypeRefFromFQN(fqn);
              referTo(clazz, 0);
            }
            lastReference = -1;
          }
          break;
View Full Code Here

Examples of aQute.bnd.osgi.Descriptors.TypeRef

      int access_flags) throws IOException {
    int type_index = in.readUnsignedShort();
    if (annotations == null)
      annotations = new HashSet<TypeRef>();

    TypeRef tr = analyzer.getTypeRef(pool[type_index].toString());
    annotations.add(tr);

    TypeRef name = analyzer.getTypeRef((String) pool[type_index]);
    if (policy == RetentionPolicy.RUNTIME) {
      referTo(type_index, 0);
      hasRuntimeAnnotations = true;
      if (api != null && (Modifier.isPublic(access_flags) || Modifier.isProtected(access_flags)))
        api.add(name.getPackageRef());
    } else {
      hasClassAnnotations = true;
    }
    int num_element_value_pairs = in.readUnsignedShort();
    Map<String,Object> elements = null;
View Full Code Here

Examples of aQute.bnd.osgi.Descriptors.TypeRef

      case 'e' : // enum constant
        int type_name_index = in.readUnsignedShort();
        if (policy == RetentionPolicy.RUNTIME) {
          referTo(type_name_index, 0);
          if (api != null && (Modifier.isPublic(access_flags) || Modifier.isProtected(access_flags))) {
            TypeRef name = analyzer.getTypeRef((String) pool[type_name_index]);
            api.add(name.getPackageRef());
          }
        }
        int const_name_index = in.readUnsignedShort();
        return pool[const_name_index];

      case 'c' : // Class
        int class_info_index = in.readUnsignedShort();
        if (policy == RetentionPolicy.RUNTIME) {
          referTo(class_info_index, 0);
          if (api != null && (Modifier.isPublic(access_flags) || Modifier.isProtected(access_flags))) {
            TypeRef name = analyzer.getTypeRef((String) pool[class_info_index]);
            api.add(name.getPackageRef());
          }
        }
        return pool[class_info_index];

      case '@' : // Annotation type
View Full Code Here

Examples of aQute.bnd.osgi.Descriptors.TypeRef

          r = parseReferences(descriptor, r + 1, '>', modifiers);
        } else
          sb.append(c);
        r++;
      }
      TypeRef ref = analyzer.getTypeRef(sb.toString());
      if (cd != null)
        cd.addReference(ref);

      referTo(ref, modifiers);
    } else {
View Full Code Here

Examples of aQute.bnd.osgi.Descriptors.TypeRef

    Object o = pool[methodRefPoolIndex];
    if (o != null && o instanceof Assoc) {
      Assoc assoc = (Assoc) o;
      if (assoc.tag == 10) {
        int string_index = intPool[assoc.a];
        TypeRef className = analyzer.getTypeRef((String) pool[string_index]);
        int name_and_type_index = assoc.b;
        Assoc name_and_type = (Assoc) pool[name_and_type_index];
        if (name_and_type.tag == 12) {
          // Name and Type
          int name_index = name_and_type.a;
View Full Code Here

Examples of aQute.bnd.osgi.Descriptors.TypeRef

  }

  private void verifyActivator() throws Exception {
    String bactivator = main.get("Bundle-Activator");
    if (bactivator != null) {
      TypeRef ref = analyzer.getTypeRefFromFQN(bactivator);
      if (analyzer.getClassspace().containsKey(ref))
        return;

      PackageRef packageRef = ref.getPackageRef();
      if (packageRef.isDefaultPackage())
        error("The Bundle Activator is not in the bundle and it is in the default package ");
      else if (!analyzer.isImported(packageRef)) {
        error("Bundle-Activator not found on the bundle class path nor in imports: " + bactivator);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.