Package juzu.impl.plugin.application.metamodel

Examples of juzu.impl.plugin.application.metamodel.ApplicationMetaModel


   * @param path the resource value
   * @return the related resource URL or null if it cannot be resolved
   * @throws ProcessingException relate any processing issue
   */
  public URL resolveResource(String path) throws ProcessingException {
    ApplicationMetaModel application = (ApplicationMetaModel)metaModel;
    ProcessingContext context = application.getProcessingContext();
    boolean relative = path.length() == 0 || path.charAt(0) != '/';
    if (relative) {
      context.info("Resolving classpath asset " + path);
      Name qn = application.getHandle().getPackageName().append("assets");
      FileObject src;
      try {
        src = context.resolveResourceFromSourcePath(pkg, qn, path);
      }
      catch (Exception e) {
View Full Code Here


      );
    assertEquals(expected, mm.toJSON());

    //
    List<MetaModelEvent> events = mm.getQueue().clear();
    ApplicationMetaModel application = mm.getChildren(ApplicationMetaModel.class).iterator().next();
    ControllerMetaModel controller = application.getChild(ControllersMetaModel.KEY).iterator().next();
    HandlerMetaModel method = controller.getHandlers().iterator().next();
    assertEquals(Arrays.asList(
      MetaModelEvent.createAdded(application),
      MetaModelEvent.createAdded(controller),
      MetaModelEvent.createAdded(method),
View Full Code Here

TOP

Related Classes of juzu.impl.plugin.application.metamodel.ApplicationMetaModel

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.