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

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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