Examples of JElement


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

Examples of org.codehaus.jam.JElement

  // ========================================================================
  // 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

Examples of org.codehaus.jam.JElement

  // ========================================================================
  // 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

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
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.