Tabnine Logo
Path.relative
Code IndexAdd Tabnine to your IDE (free)

How to use
relative
method
in
juzu.impl.common.Path

Best Java code snippets using juzu.impl.common.Path.relative (Showing top 6 results out of 315)

origin: org.juzu/juzu-core

public static Path create(boolean absolute, Name qn, String rawName, String ext) {
 if (absolute) {
  return absolute(qn, rawName,  ext);
 } else {
  return relative(qn, rawName, ext);
 }
}
origin: juzu/juzu

public static Path create(boolean absolute, Name qn, String rawName, String ext) {
 if (absolute) {
  return absolute(qn, rawName,  ext);
 } else {
  return relative(qn, rawName, ext);
 }
}
origin: org.juzu/juzu-core

public TemplatesDescriptor(
  ApplicationDescriptor application,
  ClassLoader loader,
  JSON config) throws Exception {
 ArrayList<BeanDescriptor> beans = new ArrayList<BeanDescriptor>();
 List<TemplateDescriptor> templates = new ArrayList<TemplateDescriptor>();
 //
 String packageName = config.getString("package");
 Name pkg = Name.parse(packageName);
 // Load templates
 for (String fqn : config.getList("templates", String.class)) {
  Class<?> clazz = loader.loadClass(fqn);
  Field f = clazz.getField("DESCRIPTOR");
  TemplateDescriptor descriptor = (TemplateDescriptor)f.get(null);
  templates.add(descriptor);
  juzu.impl.common.Path.Absolute path = (juzu.impl.common.Path.Absolute)juzu.impl.common.Path.parse(descriptor.getPath());
  Path qualifier;
  if (pkg.isPrefix(path.getName())) {
   juzu.impl.common.Path.Relative relativePath = juzu.impl.common.Path.relative(path.getName().subName(pkg.size()), path.getExt());
   qualifier = new PathLiteral(relativePath.getCanonical());
  } else {
   qualifier = new PathLiteral(path.getCanonical());
  }
  beans.add(BeanDescriptor.createFromImpl(Template.class, null, Arrays.<Annotation>asList(qualifier), descriptor.getType()));
 }
 //
 this.templates = templates;
 this.pkg = pkg;
 this.beans = beans;
}
origin: juzu/juzu

public TemplatesDescriptor(
  ApplicationDescriptor application,
  ClassLoader loader,
  JSON config) throws Exception {
 ArrayList<BeanDescriptor> beans = new ArrayList<BeanDescriptor>();
 List<TemplateDescriptor> templates = new ArrayList<TemplateDescriptor>();
 //
 String packageName = config.getString("package");
 Name pkg = Name.parse(packageName);
 // Load templates
 for (String fqn : config.getList("templates", String.class)) {
  Class<?> clazz = loader.loadClass(fqn);
  Field f = clazz.getField("DESCRIPTOR");
  TemplateDescriptor descriptor = (TemplateDescriptor)f.get(null);
  templates.add(descriptor);
  juzu.impl.common.Path.Absolute path = (juzu.impl.common.Path.Absolute)juzu.impl.common.Path.parse(descriptor.getPath());
  Path qualifier;
  if (pkg.isPrefix(path.getName())) {
   juzu.impl.common.Path.Relative relativePath = juzu.impl.common.Path.relative(path.getName().subName(pkg.size()), path.getExt());
   qualifier = new PathLiteral(relativePath.getCanonical());
  } else {
   qualifier = new PathLiteral(path.getCanonical());
  }
  beans.add(BeanDescriptor.createFromImpl(Template.class, null, Arrays.<Annotation>asList(qualifier), descriptor.getType()));
 }
 //
 this.templates = templates;
 this.pkg = pkg;
 this.beans = beans;
}
origin: org.juzu/juzu-core

Name fqn = pkg.append(name);
Path.Absolute absolute = Path.absolute(fqn, ".gtmpl");
Path.Relative relative = Path.relative(name, ".gtmpl");
GroovyTemplateEmitter generator = new GroovyTemplateEmitter(fqn);
try {
origin: juzu/juzu

Name fqn = pkg.append(name);
Path.Absolute absolute = Path.absolute(fqn, ".gtmpl");
Path.Relative relative = Path.relative(name, ".gtmpl");
GroovyTemplateEmitter generator = new GroovyTemplateEmitter(fqn);
try {
juzu.impl.commonPathrelative

Popular methods of Path

  • parse
  • absolute
  • as
  • getCanonical
  • getDirs
    Returns the path directories as a name.
  • getExt
    Returns the path extension.
  • getRawName
    Returns the path raw name.
  • isAbsolute
  • append
  • create
  • getName
    Returns the path as a name.
  • getSimpleName
    Returns the path simple name: the raw name followed by the extension.
  • getName,
  • getSimpleName,
  • isRelative

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 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