Codota Logo
ScannedItem.getRelativePath
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
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

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
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