Package org.codehaus.jam

Examples of org.codehaus.jam.JElement


  protected ElementImpl(ElementImpl parent) {
    if (parent == null) throw new IllegalArgumentException("null ctx");
    if (parent == this) {
      throw new IllegalArgumentException("An element cannot be its own parent");
    }
    JElement check = parent.getParent();
    while(check != null) {
      if (check == this) throw new IllegalArgumentException("cycle detected");
      check = check.getParent();
    };
    mContext = parent.getContext();
    mParent = parent;
  }
View Full Code Here


  // ========================================================================
  // JMember implementation

  public JClass getContainingClass() {
    JElement p = getParent();
    //FIXME very gross
    if (p instanceof JClass) return (JClass)p;
    if (p instanceof JMember) return ((JMember)p).getContainingClass();
    return null;
  }
View Full Code Here

  // ========================================================================
  // JMember implementation

  public JClass getContainingClass() {
    JElement p = getParent();
    //FIXME very gross
    if (p instanceof JClass) return (JClass)p;
    if (p instanceof JMember) return ((JMember)p).getContainingClass();
    return null;
  }
View Full Code Here

  protected ElementImpl(ElementImpl parent) {
    if (parent == null) throw new IllegalArgumentException("null ctx");
    if (parent == this) {
      throw new IllegalArgumentException("An element cannot be its own parent");
    }
    JElement check = parent.getParent();
    while(check != null) {
      if (check == this) throw new IllegalArgumentException("cycle detected");
      check = check.getParent();
    };
    mContext = parent.getContext();
    mParent = parent;
  }
View Full Code Here

TOP

Related Classes of org.codehaus.jam.JElement

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.