Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.errai.ui.rebind.less;
 
 
Find all less stylesheets on the classpath.

Author(s):
edewit@redhat.com
public class LessStylesheetScanner {
  private final LessReflections reflections;
  public LessStylesheetScanner() {
     = new LessReflections();
  }
  }
  private static class LessReflections extends Reflections {
    private LessReflections() {
      super(new ConfigurationBuilder()
              .filterInputsBy(new FilterBuilder().include(".*\\.less"))
              .setScanners(new LessResourceScanner())
              .setUrls(ClasspathHelper.forClassLoader()));
      scan();
    }
  }
  private static class LessResourceScanner extends ResourcesScanner {
    @Override
    public boolean acceptsInput(String file) {
      return file != null && file.endsWith("less");
    }
  }
New to GrepCode? Check out our FAQ X