Examples of IGetterNode


Examples of org.apache.flex.compiler.tree.as.IGetterNode

{
    @Override
    @Test
    public void testGetAccessor()
    {
        IGetterNode node = (IGetterNode) getAccessor("function get foo():int{}");
        asBlockWalker.visitGetter(node);
        assertOut("/**\n * @return {number}\n */\nFalconTest_A.prototype.get_foo = function() {\n}");
    }
View Full Code Here

Examples of org.apache.flex.compiler.tree.as.IGetterNode

    @Override
    @Test
    public void testGetAccessor_withBody()
    {
        IGetterNode node = (IGetterNode) getAccessor("function get foo():int{return -1;}");
        asBlockWalker.visitGetter(node);
        assertOut("/**\n * @return {number}\n */\nFalconTest_A.prototype.get_foo = function() {\n  return -1;\n}");
    }
View Full Code Here

Examples of org.apache.flex.compiler.tree.as.IGetterNode

    @Override
    @Test
    public void testGetAccessor_withNamespace()
    {
        IGetterNode node = (IGetterNode) getAccessor("public function get foo():int{return -1;}");
        asBlockWalker.visitGetter(node);
        assertOut("/**\n * @expose\n * @return {number}\n */\nFalconTest_A.prototype.get_foo = function() {\n  return -1;\n}");
    }
View Full Code Here

Examples of org.apache.flex.compiler.tree.as.IGetterNode

    @Override
    @Test
    public void testGetAccessor_withNamespaceOverride()
    {
        IGetterNode node = (IGetterNode) getAccessor("public override function get foo():int{super.foo(); return -1;}");
        asBlockWalker.visitGetter(node);
        assertOut("/**\n * @expose\n * @return {number}\n * @override\n */\nFalconTest_A.prototype.get_foo = function() {\n  goog.base(this, 'get_foo');\n  return -1;\n}");
    }
View Full Code Here

Examples of org.apache.flex.compiler.tree.as.IGetterNode

    @Override
    @Test
    public void testGetAccessor_withStatic()
    {
        IGetterNode node = (IGetterNode) getAccessor("public static function get foo():int{return -1;}");
        asBlockWalker.visitGetter(node);
        assertOut("/**\n * @expose\n * @return {number}\n */\nFalconTest_A.get_foo = function() {\n  return -1;\n}");
    }
View Full Code Here

Examples of org.apache.flex.compiler.tree.as.IGetterNode

{
    @Override
    @Test
    public void testGetAccessor()
    {
        IGetterNode node = (IGetterNode) getAccessor("function get foo():int{}");
        asBlockWalker.visitGetter(node);
        assertOut("Object.defineProperty(\n\tFalconTest_A.prototype, \n\t'foo', "
                + "\n\t{get:function() {\n\t}, configurable:true}\n)");
    }
View Full Code Here

Examples of org.apache.flex.compiler.tree.as.IGetterNode

    }

    @Test
    public void testGetAccessor_withBody()
    {
        IGetterNode node = (IGetterNode) getAccessor("function get foo():int{return -1;}");
        asBlockWalker.visitGetter(node);
        assertOut("Object.defineProperty(\n\tFalconTest_A.prototype, \n\t'foo', "
                + "\n\t{get:function() {\n\t\tvar self = this;\n\t\treturn -1;\n\t}, configurable:true}\n)");
    }
View Full Code Here

Examples of org.apache.flex.compiler.tree.as.IGetterNode

    @Override
    @Test
    public void testGetAccessor_withNamespace()
    {
        IGetterNode node = (IGetterNode) getAccessor("public function get foo():int{return -1;}");
        asBlockWalker.visitGetter(node);
        assertOut("Object.defineProperty(\n\tFalconTest_A.prototype, \n\t'foo', "
                + "\n\t{get:function() {\n\t\tvar self = this;\n\t\treturn -1;\n\t}, configurable:true}\n)");
    }
View Full Code Here

Examples of org.apache.flex.compiler.tree.as.IGetterNode

    public void testGetAccessor_withNamespaceOverride()
    {
        // TODO (erikdebruin) need to figure out how to handle calls to
        //                    'super' since the JS getter is actually an
        //                    anonymous function... goog.bind or goog.partial?
        IGetterNode node = (IGetterNode) getAccessor("public override function get foo():int{super.foo(); return -1;}");
        asBlockWalker.visitGetter(node);
        assertOut("Object.defineProperty(\n\tFalconTest_A.prototype, \n\t'foo', \n\t{get:function() {\n\t\tvar self = this;\n\t\tFalconTest_A.base(this, 'foo');\n\t\treturn -1;\n\t}, configurable:true}\n)");
    }
View Full Code Here

Examples of org.apache.flex.compiler.tree.as.IGetterNode

    @Override
    @Test
    public void testGetAccessor_withStatic()
    {
        IGetterNode node = (IGetterNode) getAccessor("public static function get foo():int{return -1;}");
        asBlockWalker.visitGetter(node);
        assertOut("Object.defineProperty(\n\tFalconTest_A, \n\t'foo', \n\t{get:function() {\n\t\treturn -1;\n\t}, configurable:true}\n)");
    }
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.