Package javarag.impl.reg

Source Code of javarag.impl.reg.NonTerminalAttribute

package javarag.impl.reg;

import java.lang.reflect.Method;

import javarag.impl.TreeStructure;
import javarag.impl.inst.AttributeHandler;
import javarag.impl.inst.CachedAttributeHandler;
import javarag.impl.inst.NonTerminalAttributeHandler;

public class NonTerminalAttribute extends Attribute {

  private BasicAttribute attribute;

  public NonTerminalAttribute(BasicAttribute attribute) {
    super(attribute.getName());
    this.attribute = attribute;
  }

  @Override
  public void addDefinition(Method def) {
    attribute.addDefinition(def);
  }

  @Override
  public AttributeHandler createHandler(TreeStructure tree, Instantiator instantiator, boolean circularityCheck) {
    return new CachedAttributeHandler(new NonTerminalAttributeHandler(attribute.createHandler(tree, instantiator, circularityCheck), tree));
  }


}
TOP

Related Classes of javarag.impl.reg.NonTerminalAttribute

TOP
Copyright © 2018 www.massapi.com. 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.