Exemplo n.º 1
0
        /**
         * Returns the type from the <i>forEach</i> statement's initializer.
         *
         * @return  The type from the <i>forEach</i> statement's initializer.
         */
        public Type getType()
        {
            if (mType == null) {
            mType = new AST2Type((AST2JSOMTree)
                    getTreeNode().GetChild(1), getTokenRewriteStream());
            }

            return mType;
        }
Exemplo n.º 2
0
        /**
         * Returns the method's return type or <code>null</code> for <code>void
         * </code> methods.
         *
         * @return  The method's return type or <code>null</code> for <code>void
         *          </code> methods.
         */
        public Type getReturnType()
        {
            if (mReturnTypeTree == null) {
            return null;
            }
            if (mReturnType == null) {
            mReturnType =
                new AST2Type(mReturnTypeTree, getTokenRewriteStream());
            }

            return mReturnType;
        }