congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ScannedItem.getRelativePath
Code IndexAdd Tabnine to your IDE (free)

How to use
getRelativePath
method
in
org.granite.scan.ScannedItem

Best Java code snippets using org.granite.scan.ScannedItem.getRelativePath (Showing top 3 results out of 315)

origin: org.graniteds/granite-client-java

  @Override
  public void handleScannedItem(ScannedItem item) {
    if ("class".equals(item.getExtension())) {
      boolean scan = false;
      
      String path = item.getRelativePath();
      for (String packageName : packageNames) {
        if (path.startsWith(packageName)) {
          scan = true;
          break;
        }
      }
      
      if (scan) {
        try {
          Class<?> cls = item.loadAsClass();
          if (cls.isAnnotationPresent(annotationClass))
            classes.add(cls);
        }
        catch (ClassFormatError e) {
        }
        catch (ClassNotFoundException e) {
        }
        catch (IOException e) {
          log.error(e, "Could not load class: %s", item);
        }
      }
    }
  }
}
origin: org.graniteds/granite-client-javafx

  @Override
  public void handleScannedItem(ScannedItem item) {
    if ("class".equals(item.getExtension())) {
      boolean scan = false;
      
      String path = item.getRelativePath();
      for (String packageName : packageNames) {
        if (path.startsWith(packageName)) {
          scan = true;
          break;
        }
      }
      
      if (scan) {
        try {
          Class<?> cls = item.loadAsClass();
          if (cls.isAnnotationPresent(annotationClass))
            classes.add(cls);
        }
        catch (ClassFormatError e) {
        }
        catch (ClassNotFoundException e) {
        }
        catch (IOException e) {
          log.error(e, "Could not load class: %s", item);
        }
      }
    }
  }
}
origin: org.graniteds/granite-client

boolean scan = false;
String path = item.getRelativePath();
for (String packageName : packageNames) {
  if (path.startsWith(packageName)) {
org.granite.scanScannedItemgetRelativePath

Popular methods of ScannedItem

  • getExtension
  • getName
  • loadAsClass
  • getClassName
  • getContent
  • loadAsProperties

Popular in Java

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
  • getApplicationContext (Context)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Best IntelliJ 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