Tabnine Logo
Resource.getFilename
Code IndexAdd Tabnine to your IDE (free)

How to use
getFilename
method
in
org.avaje.classpath.scanner.Resource

Best Java code snippets using org.avaje.classpath.scanner.Resource.getFilename (Showing top 3 results out of 315)

origin: io.ebean/ebean-migration

private boolean readResourcesForPath(String path) {
 ClassLoader classLoader = migrationConfig.getClassLoader();
 Scanner scanner = new Scanner(classLoader);
 List<Resource> resourceList = scanner.scanForResources(path, new Match(migrationConfig));
 logger.debug("resources: {}", resourceList);
 for (Resource resource : resourceList) {
  String filename = resource.getFilename();
  if (filename.endsWith(migrationConfig.getApplySuffix())) {
   versions.add(createScriptMigration(resource, filename));
  } else if (migrationConfig.getJdbcMigrationFactory() != null && filename.endsWith(".class")) {
   versions.add(createJdbcMigration(resource, filename));
  }
 }
 Collections.sort(versions);
 return !versions.isEmpty();
}
origin: io.ebean/ebean-dbmigration

/**
 * Read all the migration resources (SQL scripts) returning true if there are versions.
 */
public boolean readResources() {
 String migrationPath = migrationConfig.getMigrationPath();
 ClassLoader classLoader = migrationConfig.getClassLoader();
 Scanner scanner = new Scanner(classLoader);
 List<Resource> resourceList = scanner.scanForResources(migrationPath, new Match(migrationConfig));
 logger.debug("resources: {}", resourceList);
 for (Resource resource : resourceList) {
  String filename = resource.getFilename();
  if (filename.endsWith(migrationConfig.getApplySuffix())) {
   int pos = filename.lastIndexOf(migrationConfig.getApplySuffix());
   String mainName = filename.substring(0, pos);
   MigrationVersion migrationVersion = MigrationVersion.parse(mainName);
   LocalMigrationResource res = new LocalMigrationResource(migrationVersion, resource.getLocation(), resource);
   versions.add(res);
  }
 }
 Collections.sort(versions);
 return !versions.isEmpty();
}
origin: org.avaje/avaje-dbmigration

/**
 * Read all the migration resources (SQL scripts) returning true if there are versions.
 */
public boolean readResources() {
 String migrationPath = migrationConfig.getMigrationPath();
 ClassLoader classLoader = migrationConfig.getClassLoader();
 Scanner scanner = new Scanner(classLoader);
 List<Resource> resourceList = scanner.scanForResources(migrationPath, new Match(migrationConfig));
 logger.debug("resources: {}", resourceList);
 for (Resource resource : resourceList) {
  String filename = resource.getFilename();
  if (filename.endsWith(migrationConfig.getApplySuffix())) {
   int pos = filename.lastIndexOf(migrationConfig.getApplySuffix());
   String mainName = filename.substring(0, pos);
   MigrationVersion migrationVersion = MigrationVersion.parse(mainName);
   LocalMigrationResource res = new LocalMigrationResource(migrationVersion, resource.getLocation(), resource);
   versions.add(res);
  }
 }
 Collections.sort(versions);
 return !versions.isEmpty();
}
org.avaje.classpath.scannerResourcegetFilename

Javadoc

Return the filename of this resource, without the path.

Popular methods of Resource

  • getLocation
    Return the location of the resource on the classpath (path and filename).
  • loadAsString
    Return the content of this resource as a string.
  • getLocationOnDisk
    Return the location of this resource on disk.

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Runner (org.openjdk.jmh.runner)
  • Top PhpStorm 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