Package org.codehaus.janino.util.resource

Examples of org.codehaus.janino.util.resource.ResourceFinder


        final Collection problems = new ArrayList();

        final StringPattern[] pattern = StringPattern.PATTERNS_NONE;

        final Compiler compiler = new Compiler(
                new ResourceFinder() {
                    public Resource findResource( final String pSourceName ) {
                        final byte[] bytes = pResourceReader.getBytes(pSourceName);

                        if (bytes == null) {
                            return null;
                        }

                        return new JciResource(pSourceName, bytes);
                    }
                },
                new ClassLoaderIClassLoader(pClassLoader),
                new ResourceFinder() {
                    public Resource findResource( final String pResourceName ) {
                        final byte[] bytes = pStore.read(pResourceName);

                        if (bytes == null) {
                            return null;
View Full Code Here


    public static IClassLoader createJavacLikePathIClassLoader(
        final File[] optionalBootClassPath,
        final File[] optionalExtDirs,
        final File[] classPath
    ) {
        ResourceFinder bootClassPathResourceFinder = new PathResourceFinder(
            optionalBootClassPath == null
            ? PathResourceFinder.parsePath(System.getProperty("sun.boot.class.path"))
            : optionalBootClassPath
        );
        ResourceFinder extensionDirectoriesResourceFinder = new JarDirectoriesResourceFinder(
            optionalExtDirs == null
            ? PathResourceFinder.parsePath(System.getProperty("java.ext.dirs"))
            : optionalExtDirs
        );
        ResourceFinder classPathResourceFinder = new PathResourceFinder(classPath);

        // We can load classes through "ResourceFinderIClassLoader"s, which means
        // they are read into "ClassFile" objects, or we can load classes through
        // "ClassLoaderIClassLoader"s, which means they are loaded into the JVM.
        //
View Full Code Here

      final Collection<CompilationProblem> problems = new ArrayList<CompilationProblem>();
     
      final StringPattern[] pattern = StringPattern.PATTERNS_NONE;

      final Compiler compiler = new Compiler(
          new ResourceFinder() {
          @Override
                    public Resource findResource( final String pSourceName ) {
            final byte[] bytes = pResourceReader.getBytes(pSourceName);
           
            if (bytes == null) {
              log.debug("failed to find source " + pSourceName);
              return null;
            }
           
            log.debug("reading " + pSourceName + " (" + bytes.length + ")");
           
            return new JciResource(pSourceName, bytes);
          }       
          },
          new ClassLoaderIClassLoader(pClassLoader),
          new ResourceFinder() {
          @Override
                    public Resource findResource( final String pResourceName ) {
            final byte[] bytes = pStore.read(pResourceName);
           
            if (bytes == null) {
View Full Code Here

        final Collection problems = new ArrayList();

        final StringPattern[] pattern = StringPattern.PATTERNS_NONE;

        final Compiler compiler = new Compiler(
                new ResourceFinder() {
                    public Resource findResource( final String pSourceName ) {
                        final byte[] bytes = pResourceReader.getBytes(pSourceName);

                        if (bytes == null) {
                            return null;
                        }

                        return new JciResource(pSourceName, bytes);
                    }
                },
                new ClassLoaderIClassLoader(pClassLoader),
                new ResourceFinder() {
                    public Resource findResource( final String pResourceName ) {
                        final byte[] bytes = pStore.read(pResourceName);

                        if (bytes == null) {
                            return null;
View Full Code Here

      final Collection problems = new ArrayList();
     
      final StringPattern[] pattern = StringPattern.PATTERNS_NONE;

      final Compiler compiler = new Compiler(
          new ResourceFinder() {
          public Resource findResource( final String pSourceName ) {
            final byte[] bytes = pResourceReader.getBytes(pSourceName);
           
            if (bytes == null) {
              return null;
            }           
           
            return new JciResource(pSourceName, bytes);
          }       
          },
          new ClassLoaderIClassLoader(pClassLoader),
          new ResourceFinder() {
          public Resource findResource( final String pResourceName ) {
            final byte[] bytes = pStore.read(pResourceName);
           
            if (bytes == null) {
              return null;
View Full Code Here

TOP

Related Classes of org.codehaus.janino.util.resource.ResourceFinder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.