congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
BundleDataFile
Code IndexAdd Tabnine 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)

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

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • BoxLayout (javax.swing)
  • Top 17 Plugins for Android Studio
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