/** @return the enclosing class body namespace or null if not in a class. */ static NameSpace getClassNameSpace( NameSpace thisNameSpace ) { if ( null == thisNameSpace ) return null; // is a class instance if ( thisNameSpace.isClass ) return thisNameSpace; if ( thisNameSpace.isMethod && thisNameSpace.getParent() != null && thisNameSpace.getParent().isClass ) return thisNameSpace.getParent(); return null; }
/** @return the enclosing class body namespace or null if not in a class. */ public static NameSpace getClassNameSpace( NameSpace thisNameSpace ) { // is a class instance //if ( thisNameSpace.classInstance != null ) if ( thisNameSpace.isClass ) return thisNameSpace; if ( thisNameSpace.isMethod && thisNameSpace.getParent() != null //&& thisNameSpace.getParent().classInstance != null && thisNameSpace.getParent().isClass ) return thisNameSpace.getParent(); return null; }
/** do we need this? */ private NameSpace getNonBlockParent() { NameSpace parent = super.getParent(); if ( parent instanceof BlockNameSpace ) return ((BlockNameSpace)parent).getNonBlockParent(); else return parent; }
/** do we need this? */ private NameSpace getNonBlockParent() { NameSpace parent = super.getParent(); if ( parent instanceof BlockNameSpace ) return ((BlockNameSpace)parent).getNonBlockParent(); else return parent; }
} else if ( Reflect.getClassModifiers(obj.getClass()).hasModifier("static") ) { Reflect.getThisNS(obj).setParent(Reflect.getThisNS(obj.getClass()).getParent());
ns=ns.getParent();
ns=ns.getParent();