Tabnine Logo
Analyzer.error
Code IndexAdd Tabnine to your IDE (free)

How to use
error
method
in
aQute.bnd.osgi.Analyzer

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

origin: biz.aQute.bnd/bndlib

private void checkMapReturnType(boolean hasMapReturnType) {
  if (hasMapReturnType) {
    if (!felixExtensions) {
      analyzer.error(
          "In component %s, to use a return type of Map you must specify -ds-felix-extensions",
          component.implementation, "");
    }
    //TODO rethink how this is signalled.
    if (component.xmlns == null) {
      component.xmlns = FELIX_1_2;
    }
  }
}
origin: biz.aQute.bnd/bnd

private void checkMapReturnType(boolean hasMapReturnType) {
  if (hasMapReturnType) {
    if (!felixExtensions) {
      analyzer.error(
          "In component %s, to use a return type of Map you must specify -ds-felix-extensions",
          component.implementation, "");
    }
    //TODO rethink how this is signalled.
    if (component.xmlns == null) {
      component.xmlns = FELIX_1_2;
    }
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

private void checkMapReturnType(DeclarativeServicesAnnotationError details) {
  if (!options.contains(Options.felixExtensions)) {
    analyzer.error(
      "In component %s, to use a return type of Map you must specify the -dsannotations-options felixExtensions flag "
        + " and use a felix extension attribute or explicitly specify the appropriate xmlns.",
      className)
      .details(details);
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

private void checkMapReturnType(DeclarativeServicesAnnotationError details) {
  if (!options.contains(Options.felixExtensions)) {
    analyzer.error(
      "In component %s, to use a return type of Map you must specify the -dsannotations-options felixExtensions flag "
        + " and use a felix extension attribute or explicitly specify the appropriate xmlns.",
      className)
      .details(details);
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

void prepare(Analyzer analyzer) {
  if (attributes.isEmpty()) {
    updateVersion(MetatypeVersion.VERSION_1_3);
  }
  Set<String> adIds = new HashSet<>();
  for (ADDef ad : attributes) {
    ad.prepare(this);
    if (!adIds.add(ad.id)) {
      analyzer.error("OCD for %s.%s has duplicate AD id %s due to colliding munged element names", id, name,
        ad.id);
    }
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

void prepare(Analyzer analyzer) {
  if (attributes.isEmpty()) {
    updateVersion(MetatypeVersion.VERSION_1_3);
  }
  Set<String> adIds = new HashSet<>();
  for (ADDef ad : attributes) {
    ad.prepare(this);
    if (!adIds.add(ad.id)) {
      analyzer.error("OCD for %s.%s has duplicate AD id %s due to colliding munged element names", id, name,
        ad.id);
    }
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public void setClasspath(File[] classpath) throws IOException {
  List<Jar> list = new ArrayList<>();
  for (int i = 0; i < classpath.length; i++) {
    if (classpath[i].exists()) {
      Jar current = new Jar(classpath[i]);
      list.add(current);
    } else {
      error("Missing file on classpath: %s", IO.absolutePath(classpath[i]));
    }
  }
  for (Iterator<Jar> i = list.iterator(); i.hasNext();) {
    addClasspath(i.next());
  }
}
origin: biz.aQute.bnd/bnd

@Override
public void annotation(Annotation annotation) throws Exception {
  try {
    java.lang.annotation.Annotation a = annotation.getAnnotation();
    if (a instanceof Designate)
      designate = annotation;
    else if (a instanceof Component)
      pids = ((Component)a).configurationPid();
  }
  catch (Exception e) {
    e.printStackTrace();
    analyzer.error("During generation of a component on class %s, exception %s", clazz, e);
  }
}
origin: biz.aQute.bnd/bndlib

@Override
public void annotation(Annotation annotation) throws Exception {
  try {
    java.lang.annotation.Annotation a = annotation.getAnnotation();
    if (a instanceof Designate)
      designate = annotation;
    else if (a instanceof Component)
      pids = ((Component)a).configurationPid();
  }
  catch (Exception e) {
    e.printStackTrace();
    analyzer.error("During generation of a component on class %s, exception %s", clazz, e);
  }
}
origin: biz.aQute.bnd/bndlib

@Override
public void annotation(Annotation annotation) throws Exception {
  try {
    java.lang.annotation.Annotation a = annotation.getAnnotation();
    if (a instanceof ObjectClassDefinition)
      doOCD((ObjectClassDefinition) a, annotation);
    else if (a instanceof AttributeDefinition)
      methods.put(method, new Pair((AttributeDefinition)a, annotation));
  }
  catch (Exception e) {
    e.printStackTrace();
    analyzer.error("During generation of a component on class %s, exception %s", clazz, e);
  }
}
origin: biz.aQute.bnd/bnd

@Override
public void annotation(Annotation annotation) throws Exception {
  try {
    java.lang.annotation.Annotation a = annotation.getAnnotation();
    if (a instanceof ObjectClassDefinition)
      doOCD((ObjectClassDefinition) a, annotation);
    else if (a instanceof AttributeDefinition)
      methods.put(method, new Pair((AttributeDefinition)a, annotation));
  }
  catch (Exception e) {
    e.printStackTrace();
    analyzer.error("During generation of a component on class %s, exception %s", clazz, e);
  }
}
origin: biz.aQute/bndlib

/**
 * 
 */
protected void doDeactivate() {
  if (!LIFECYCLEDESCRIPTOR.matcher(method.getDescriptor().toString()).matches())
    analyzer.error(
        "Deactivate method for %s does not have an acceptable prototype, only Map, ComponentContext, or BundleContext is allowed. Found: %s",
        clazz, method.getDescriptor());
  else {
    component.deactivate = method.getName();
  }
}
origin: biz.aQute/bndlib

/**
 * 
 */
protected void doActivate() {
  if (!LIFECYCLEDESCRIPTOR.matcher(method.getDescriptor().toString()).matches())
    analyzer.error(
        "Activate method for %s does not have an acceptable prototype, only Map, ComponentContext, or BundleContext is allowed. Found: %s",
        clazz, method.getDescriptor());
  else {
    component.activate = method.getName();
  }
}
origin: biz.aQute/bndlib

/**
 * 
 */
protected void doModified() {
  if (!LIFECYCLEDESCRIPTOR.matcher(method.getDescriptor().toString()).matches())
    analyzer.error(
        "Modified method for %s does not have an acceptable prototype, only Map, ComponentContext, or BundleContext is allowed. Found: %s",
        clazz, method.getDescriptor());
  else {
    component.modified = method.getName();
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public void addClasspath(Collection<?> jars) throws IOException {
  for (Object jar : jars) {
    if (jar instanceof Jar)
      addClasspath((Jar) jar);
    else if (jar instanceof File)
      addClasspath((File) jar);
    else if (jar instanceof String)
      addClasspath(getFile((String) jar));
    else
      error("Cannot convert to JAR to add to classpath %s. Not a File, Jar, or String", jar);
  }
}
origin: biz.aQute/bndlib

public void addClasspath(Collection< ? > jars) throws IOException {
  for (Object jar : jars) {
    if (jar instanceof Jar)
      addClasspath((Jar) jar);
    else if (jar instanceof File)
      addClasspath((File) jar);
    else if (jar instanceof String)
      addClasspath(getFile((String) jar));
    else
      error("Cannot convert to JAR to add to classpath %s. Not a File, Jar, or String", jar);
  }
}
origin: biz.aQute.bnd/bnd

public void addClasspath(Collection< ? > jars) throws IOException {
  for (Object jar : jars) {
    if (jar instanceof Jar)
      addClasspath((Jar) jar);
    else if (jar instanceof File)
      addClasspath((File) jar);
    else if (jar instanceof String)
      addClasspath(getFile((String) jar));
    else
      error("Cannot convert to JAR to add to classpath %s. Not a File, Jar, or String", jar);
  }
}
origin: biz.aQute.bnd/bndlib

public void addClasspath(Collection< ? > jars) throws IOException {
  for (Object jar : jars) {
    if (jar instanceof Jar)
      addClasspath((Jar) jar);
    else if (jar instanceof File)
      addClasspath((File) jar);
    else if (jar instanceof String)
      addClasspath(getFile((String) jar));
    else
      error("Cannot convert to JAR to add to classpath %s. Not a File, Jar, or String", jar);
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

public void addClasspath(Collection<?> jars) throws IOException {
  for (Object jar : jars) {
    if (jar instanceof Jar)
      addClasspath((Jar) jar);
    else if (jar instanceof File)
      addClasspath((File) jar);
    else if (jar instanceof String)
      addClasspath(getFile((String) jar));
    else
      error("Cannot convert to JAR to add to classpath %s. Not a File, Jar, or String", jar);
  }
}
origin: biz.aQute.bnd/bndlib

private void parseAndMergeInheritedMetadata(TypeRef ref, Clazz child) throws Exception {
  if (ref.isJava())
    return;
  Clazz ec = reporter.findClass(ref);
  if (ec == null) {
    reporter.error("Missing inherited class for Metatype annotations: " + ref + " from " + child.getClassName());
  } else {
    MetaTypeReader mtr = new MetaTypeReader(ec, reporter);
    mtr.setDesignate(designatePid, factory);
    mtr.finish();
    for (Map.Entry<MethodDef,Meta.AD> entry : mtr.methods.entrySet())
      addMethod(entry.getKey(), entry.getValue());
    handleInheritedClasses(ec);
  }
}
aQute.bnd.osgiAnalyzererror

Popular methods of Analyzer

  • <init>
  • setProperty
  • calcManifest
    One of the main workhorses of this class. This will analyze the current setp and calculate a new man
  • getProperty
  • setJar
    Set the JAR file we are going to work in. This will read the JAR in memory.
  • getJar
  • setProperties
  • getReferred
  • analyze
    Calculates the data structures for generating a manifest.
  • findClass
    Find a clazz on the class path. This class has been parsed.
  • getBsn
    Clear the key part of a header. I.e. remove everything from the first ';'
  • getClasses
  • getBsn,
  • getClasses,
  • getClasspath,
  • getPackageRef,
  • getProperties,
  • getTypeRef,
  • parseHeader,
  • setBundleSymbolicName,
  • setBundleVersion

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Vim 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