Package net.sf.laja.template.data

Examples of net.sf.laja.template.data.AttributeRef


    return new MethodRef();
  }

  @Override
  public IAttributeVariableRef createAttributeVariableRef() {
    return new AttributeRef(namespaces);
  }
View Full Code Here


    return new VariableRef();
  }

  @Override
  public IAttributeRef createAttributeRef() {
    return new AttributeRef(namespaces);
  }
View Full Code Here

    return new AttributeRef(namespaces);
  }

  @Override
  public IAttributeMethodRef createAttributeMethodRef() {
    return new AttributeRef(namespaces);
  }
View Full Code Here

    target = (Reference)itarget;
    setContextToMacroLocalContextIfVariableExistsInParamaterList();
  }

  private void setContextToMacroLocalContextIfVariableExistsInParamaterList() {
    AttributeRef attributeRef = target.getAttributeRef();
   
    if (attributeRef != null) {
      String variableToSet = attributeRef.getVariableName();
     
      if (macro != null && macro.getParameters().contains(variableToSet)) {
        context = macro.getLocalContext();
      } else if (target.isNamespaceRef()) {
        throw new RuntimeException("Setting namespaces not implemented.");
View Full Code Here

      data.setAttribute(target.getVariableName(), target.getSpecifiedContext(context));
    } else {
      // e.g: #set (x.a = "1") or #set ($n.x.a = "1") or #set (a.b.c.d = 1)
      AttributeRefs targetAttributeRefs = target.getAttributesRefs();
     
      AttributeRef targetAttributeRef = targetAttributeRefs.getLastAttribute();
      String targetAttributeName = targetAttributeRef.getName();
     
      Object targetObject = target.getContext().evaluate(target.getAttributeRef());
     
      if (targetObject == null) {
        throw new InterpretationException(source, indexInSource, "Can not set value, the target was null '" + target.getAttributeRef().getName() + "'");
View Full Code Here

TOP

Related Classes of net.sf.laja.template.data.AttributeRef

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.