/** * Returns the content of the class declaration body. * * @return The content of the class declaration body. */ public ClassTopLevelScope getTopLevelScope() { if (mScope == null) { mScope = new AST2ClassTopLevelScope( mScopeTree, this, getTokenRewriteStream()); } return mScope; }
/** * An enumeration constant can be followed by it's own class body that * corresponds to a class bodies of an anonymous class declaration. However, * to keep things simple this method returns a fully featured <code> * ClassTopLevelScope</code> object. * * @return The class top level scope following the enumeration constant or * <code>null</code> if no appropriate class body has been stated. */ public ClassTopLevelScope getClassTopLevelScope() { if (mClassScopeTree == null) { return null; // There're no class scope. } if (mClassScope == null) { mClassScope = new AST2ClassTopLevelScope( mClassScopeTree, this, getTokenRewriteStream()); } return mClassScope; }
/** * The enumeration constant declaration part can be followed by the contents * of a class body. * * @return The class top level scope following the enumeration constant * declaration part or <code>null</code> of no appropriate class * body like content has been stated. */ public ClassTopLevelScope getClassTopLevelScope() { if (!mHasClassScope) { return null; // There're no class scope. } if (mClassScope == null) { AST2JSOMTree tree = (AST2JSOMTree)getTreeNode(); mClassScope = new AST2ClassTopLevelScope((AST2JSOMTree) tree.GetChild(tree.ChildCount - 1), this, getTokenRewriteStream()); } return mClassScope; }