Tabnine Logo
Clazz.isInterface
Code IndexAdd Tabnine to your IDE (free)

How to use
isInterface
method
in
aQute.bnd.osgi.Clazz

Best Java code snippets using aQute.bnd.osgi.Clazz.isInterface (Showing top 20 results out of 315)

origin: biz.aQute.bnd/biz.aQute.bndlib

private void doXmlAttribute(Annotation annotation, XMLAttribute xmlAttr) {
  if (current == null) {
    if (clazz.isInterface()) {
      ocd.addExtensionAttribute(xmlAttr, annotation);
    }
  } else {
    current.addExtensionAttribute(xmlAttr, annotation);
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

private void doXmlAttribute(Annotation annotation, XMLAttribute xmlAttr) {
  if (current == null) {
    if (clazz.isInterface()) {
      ocd.addExtensionAttribute(xmlAttr, annotation);
    }
  } else {
    current.addExtensionAttribute(xmlAttr, annotation);
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public void implementsInterfaces(TypeRef names[]) throws Exception {
  Arrays.sort(names); // ignore type reordering
  for (TypeRef name : names) {
    String comment = null;
    if (clazz.isInterface() || clazz.isAbstract())
      comment = inherit(members, name);
    members.add(new Element(IMPLEMENTS, name.getFQN(), null, MINOR, MAJOR, comment));
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

@Override
public void implementsInterfaces(TypeRef names[]) throws Exception {
  Arrays.sort(names); // ignore type reordering
  for (TypeRef name : names) {
    String comment = null;
    if (clazz.isInterface() || clazz.isAbstract())
      comment = inherit(members, name);
    members.add(new Element(IMPLEMENTS, name.getFQN(), null, MINOR, MAJOR, comment));
  }
}
origin: biz.aQute/bndlib

@Override
public void implementsInterfaces(TypeRef names[]) throws Exception {
  // TODO is interface reordering important for binary
  // compatibility??
  for (TypeRef name : names) {
    String comment = null;
    if (clazz.isInterface() || clazz.isAbstract())
      comment = inherit(members, name);
    members.add(new Element(Type.IMPLEMENTS, name.getFQN(), null, MINOR, MAJOR, comment));
  }
}
origin: biz.aQute.bnd/bndlib

@Override
public void implementsInterfaces(TypeRef names[]) throws Exception {
  // TODO is interface reordering important for binary
  // compatibility??
  for (TypeRef name : names) {
    String comment = null;
    if (clazz.isInterface() || clazz.isAbstract())
      comment = inherit(members, name);
    members.add(new Element(Type.IMPLEMENTS, name.getFQN(), null, MINOR, MAJOR, comment));
  }
}
origin: biz.aQute.bnd/bnd

@Override
public void implementsInterfaces(TypeRef names[]) throws Exception {
  // TODO is interface reordering important for binary
  // compatibility??
  for (TypeRef name : names) {
    String comment = null;
    if (clazz.isInterface() || clazz.isAbstract())
      comment = inherit(members, name);
    members.add(new Element(Type.IMPLEMENTS, name.getFQN(), null, MINOR, MAJOR, comment));
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

private boolean acceptableType(String rtype) {
  TypeRef ref = analyzer.getTypeRef(rtype);
  try {
    Clazz returnType = analyzer.findClass(ref);
    if (returnType.isEnum()) {
      return true;
    }
    // TODO check this is true for interfaces and annotations
    if (!returnType.isAbstract() || (returnType.isInterface() && options.contains(Options.nested))) {
      return true;
    }
    if (!returnType.isInterface()) {
      analyzer.error("Abstract classes not allowed as interface method return values: %s", rtype);
    } else {
      analyzer.error("Nested metatype only allowed with option: nested type %s", rtype);
    }
    return false;
  } catch (Exception e) {
    analyzer.exception(e, "could not examine class for return type %s, exception message: %s", rtype, e);
    return false;
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public void extendsClass(TypeRef name) throws Exception {
  String comment = null;
  if (!clazz.isInterface())
    comment = inherit(members, name);
  Clazz c = analyzer.findClass(name);
  if ((c == null || c.isPublic()) && !name.isObject())
    members.add(new Element(EXTENDS, name.getFQN(), null, MICRO, MAJOR, comment));
}
origin: biz.aQute.bnd/biz.aQute.bnd

private boolean acceptableType(String rtype) {
  TypeRef ref = analyzer.getTypeRef(rtype);
  try {
    Clazz returnType = analyzer.findClass(ref);
    if (returnType.isEnum()) {
      return true;
    }
    // TODO check this is true for interfaces and annotations
    if (!returnType.isAbstract() || (returnType.isInterface() && options.contains(Options.nested))) {
      return true;
    }
    if (!returnType.isInterface()) {
      analyzer.error("Abstract classes not allowed as interface method return values: %s", rtype);
    } else {
      analyzer.error("Nested metatype only allowed with option: nested type %s", rtype);
    }
    return false;
  } catch (Exception e) {
    analyzer.exception(e, "could not examine class for return type %s, exception message: %s", rtype, e);
    return false;
  }
}
origin: biz.aQute/bndlib

@Override
public void extendsClass(TypeRef name) throws Exception {
  String comment = null;
  if (!clazz.isInterface())
    comment = inherit(members, name);
  Clazz c = analyzer.findClass(name);
  if ((c == null || c.isPublic()) && !name.isObject())
    members.add(new Element(Type.EXTENDS, name.getFQN(), null, MICRO, MAJOR, comment));
}
origin: biz.aQute.bnd/bndlib

@Override
public void extendsClass(TypeRef name) throws Exception {
  String comment = null;
  if (!clazz.isInterface())
    comment = inherit(members, name);
  Clazz c = analyzer.findClass(name);
  if ((c == null || c.isPublic()) && !name.isObject())
    members.add(new Element(Type.EXTENDS, name.getFQN(), null, MICRO, MAJOR, comment));
}
origin: biz.aQute.bnd/biz.aQute.bnd

@Override
public void extendsClass(TypeRef name) throws Exception {
  String comment = null;
  if (!clazz.isInterface())
    comment = inherit(members, name);
  Clazz c = analyzer.findClass(name);
  if ((c == null || c.isPublic()) && !name.isObject())
    members.add(new Element(EXTENDS, name.getFQN(), null, MICRO, MAJOR, comment));
}
origin: biz.aQute.bnd/bnd

@Override
public void extendsClass(TypeRef name) throws Exception {
  String comment = null;
  if (!clazz.isInterface())
    comment = inherit(members, name);
  Clazz c = analyzer.findClass(name);
  if ((c == null || c.isPublic()) && !name.isObject())
    members.add(new Element(Type.EXTENDS, name.getFQN(), null, MICRO, MAJOR, comment));
}
origin: biz.aQute.bnd/biz.aQute.bndlib

private boolean identifiableCollection(TypeRef type, boolean intface, boolean topLevel) {
  try {
    Clazz clazz = analyzer.findClass(type);
    if (clazz != null && (!topLevel || !clazz.isAbstract())
      && ((intface && clazz.isInterface()) ^ clazz.hasPublicNoArgsConstructor())) {
      TypeRef[] intfs = clazz.getInterfaces();
      if (intfs != null) {
        for (TypeRef intf : intfs) {
          if (COLLECTION.matcher(intf.getFQN())
            .matches() || identifiableCollection(intf, true, false)) {
            return true;
          }
        }
      }
      TypeRef ext = clazz.getSuper();
      return ext != null && identifiableCollection(ext, false, false);
    }
  } catch (Exception e) {
    return false;
  }
  return false;
}
origin: biz.aQute.bnd/biz.aQute.bnd

private boolean identifiableCollection(TypeRef type, boolean intface, boolean topLevel) {
  try {
    Clazz clazz = analyzer.findClass(type);
    if (clazz != null && (!topLevel || !clazz.isAbstract())
      && ((intface && clazz.isInterface()) ^ clazz.hasPublicNoArgsConstructor())) {
      TypeRef[] intfs = clazz.getInterfaces();
      if (intfs != null) {
        for (TypeRef intf : intfs) {
          if (COLLECTION.matcher(intf.getFQN())
            .matches() || identifiableCollection(intf, true, false)) {
            return true;
          }
        }
      }
      TypeRef ext = clazz.getSuper();
      return ext != null && identifiableCollection(ext, false, false);
    }
  } catch (Exception e) {
    return false;
  }
  return false;
}
origin: biz.aQute.bnd/biz.aQute.bndlib

private List<BeanDef> getDefs() throws Exception {
  if (clazz.isEnum() || clazz.isInterface() || clazz.isAnnotation()) {
origin: biz.aQute.bnd/biz.aQute.bndlib

  clazz.parseClassFileWithCollector(
    new ComponentPropertyTypeDataCollector(propertyDefKey, memberDescriptor, details));
} else if (clazz.isInterface() && options.contains(Options.felixExtensions)) {
  component.updateVersion(V1_3);
} else {
origin: biz.aQute.bnd/biz.aQute.bndlib

private void doOCD(ObjectClassDefinition o, Annotation annotation) {
  if (ocd.id == null) {
    if (clazz.isInterface()) {
      ocd.id = annotation.get("id") == null ? name.getFQN() : o.id();
      ocd.name = annotation.get("name") == null ? space(ocd.id) : o.name();
      ocd.description = annotation.get("description") == null ? "" : o.description();
      ocd.localization = annotation.get("localization") == null ? "OSGI-INF/l10n/" + name.getFQN()
        : o.localization();
      if (annotation.get("pid") != null) {
        String[] pids = o.pid();
        designates(name.getFQN(), pids, false);
      }
      if (annotation.get("factoryPid") != null) {
        String[] pids = o.factoryPid();
        designates(name.getFQN(), pids, true);
      }
      if (annotation.get("icon") != null) {
        Icon[] icons = o.icon();
        for (Icon icon : icons) {
          ocd.icons.add(new IconDef(icon.resource(), icon.size()));
        }
      }
    } else {
      analyzer.error("ObjectClassDefinition applied to non-interface, non-annotation class %s", clazz);
    }
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

private void doOCD(ObjectClassDefinition o, Annotation annotation) {
  if (ocd.id == null) {
    if (clazz.isInterface()) {
      ocd.id = annotation.get("id") == null ? name.getFQN() : o.id();
      ocd.name = annotation.get("name") == null ? space(ocd.id) : o.name();
      ocd.description = annotation.get("description") == null ? "" : o.description();
      ocd.localization = annotation.get("localization") == null ? "OSGI-INF/l10n/" + name.getFQN()
        : o.localization();
      if (annotation.get("pid") != null) {
        String[] pids = o.pid();
        designates(name.getFQN(), pids, false);
      }
      if (annotation.get("factoryPid") != null) {
        String[] pids = o.factoryPid();
        designates(name.getFQN(), pids, true);
      }
      if (annotation.get("icon") != null) {
        Icon[] icons = o.icon();
        for (Icon icon : icons) {
          ocd.icons.add(new IconDef(icon.resource(), icon.size()));
        }
      }
    } else {
      analyzer.error("ObjectClassDefinition applied to non-interface, non-annotation class %s", clazz);
    }
  }
}
aQute.bnd.osgiClazzisInterface

Popular methods of Clazz

  • <init>
  • parseClassFileWithCollector
  • getClassName
  • getFQN
  • getReferred
  • is
  • isAnnotation
  • crawl
    We must find Class.forName references ...
  • doAnnotation
  • doAnnotations
  • doAttribute
    Process a single attribute, if not recognized, skip it.
  • doAttributes
    Called for each attribute in the class, field, or method.
  • doAttribute,
  • doAttributes,
  • doCode,
  • doConstantValue,
  • doElementValue,
  • doEnclosingMethod,
  • doExceptions,
  • doInnerClasses,
  • doParameterAnnotations

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JFileChooser (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now