Package org.crsh.vfs

Examples of org.crsh.vfs.Resource


    }

    TimestampedObject<Class<? extends T>> providerRef = loadClass(name);

    //
    Resource script = getResource(name);

    //
    if (script != null) {
      if (providerRef != null) {
        if (script.getTimestamp() != providerRef.getTimestamp()) {
          providerRef = null;
        }
      }

      //
      if (providerRef == null) {

        //
        String source;
        try {
          source = new String(script.getContent(), "UTF-8");
        }
        catch (UnsupportedEncodingException e) {
          throw new CommandException(ErrorKind.INTERNAL, "Could not compile command script " + name, e);
        }

        //
        Class<? extends T> clazz = classFactory.parse(name, source);
        providerRef = new TimestampedObject<Class<? extends T>>(script.getTimestamp(), clazz);
        saveClass(name, providerRef);
      }
    }

    //
View Full Code Here

TOP

Related Classes of org.crsh.vfs.Resource

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.