Codota Logo
BundleDataFile
Code IndexAdd Codota to your IDE (free)

How to use
BundleDataFile
in
org.jboss.weld.environment.osgi.api.annotation

Best Java code snippets using org.jboss.weld.environment.osgi.api.annotation.BundleDataFile (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: org.jboss.weld.osgi/weld-osgi-core-extension

@Produces
@BundleDataFile("")
public File getDataFile(BundleHolder holder, InjectionPoint p) {
  logger.trace("Entering OSGiUtilitiesProducer : getDataFile() "
      + "with parameters {} | {}",
         new Object[] {holder,p});
  Set<Annotation> qualifiers = p.getQualifiers();
  BundleDataFile file = null;
  for (Annotation qualifier : qualifiers) {
    if (qualifier.annotationType().equals(BundleDataFile.class)) {
      file = (BundleDataFile) qualifier;
      break;
    }
  }
  if (file.value().equals("")) {
    logger.warn("Returning null,"
          + " the BundleDataFile annotation path was empty");
    return null;
  }
  BundleContext context = getBundleContext(holder, p);
  if (context == null) {
    logger.warn("Returning null, unable to retrieve the BundleContext "
          + "for holder {} and injection point {}", holder, p);
    return null;
  }
  logger.debug("Returning the file {} from bundle context {}",
         file.value(),
         context);
  return context.getDataFile(file.value());
}
origin: org.jboss.weld.osgi.tests/weld-osgi-bundle1

String symbolicName;
@Inject @BundleDataFile("test.txt")
File file;
org.jboss.weld.environment.osgi.api.annotationBundleDataFile

Most used methods

  • <init>
  • value

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Collectors (java.util.stream)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now