Package org.apache.flex.compiler.tree.as

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


    @Override
    @Test
    public void testSetAccessor()
    {
        ISetterNode node = (ISetterNode) getAccessor("function set foo(value:int):void{}");
        asBlockWalker.visitSetter(node);
        assertOut("/**\n * @param {number} value\n */\nFalconTest_A.prototype.set_foo = function(value) {\n}");
    }
View Full Code Here


    @Override
    @Test
    public void testSetAccessor_withBody()
    {
        ISetterNode node = (ISetterNode) getAccessor("function set foo(value:int):void{fetch('haai');}");
        asBlockWalker.visitSetter(node);
        assertOut("/**\n * @param {number} value\n */\nFalconTest_A.prototype.set_foo = function(value) {\n  fetch('haai');\n}");
    }
View Full Code Here

    @Override
    @Test
    public void testSetAccessor_withNamespace()
    {
        ISetterNode node = (ISetterNode) getAccessor("public function set foo(value:int):void{}");
        asBlockWalker.visitSetter(node);
        assertOut("/**\n * @expose\n * @param {number} value\n */\nFalconTest_A.prototype.set_foo = function(value) {\n}");
    }
View Full Code Here

    @Override
    @Test
    public void testSetAccessor_withNamespaceOverride()
    {
        ISetterNode node = (ISetterNode) getAccessor("public override function set foo(value:int):void{super.foo();}");
        asBlockWalker.visitSetter(node);
        assertOut("/**\n * @expose\n * @param {number} value\n * @override\n */\nFalconTest_A.prototype.set_foo = function(value) {\n  goog.base(this, 'set_foo');\n}");
    }
View Full Code Here

    @Override
    @Test
    public void testSetAccessor_withStatic()
    {
        ISetterNode node = (ISetterNode) getAccessor("public static function set foo(value:int):void{}");
        asBlockWalker.visitSetter(node);
        assertOut("/**\n * @expose\n * @param {number} value\n */\nFalconTest_A.set_foo = function(value) {\n}");
    }
View Full Code Here

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

    }

    @Test
    public void testSetAccessor_withBody()
    {
        ISetterNode node = (ISetterNode) getAccessor("function set foo(value:int):void{trace('haai');}");
        asBlockWalker.visitSetter(node);
        assertOut("Object.defineProperty(\n\tFalconTest_A.prototype, \n\t'foo', "
                + "\n\t{set:function(value) {\n\t\tvar self = this;\n\t\ttrace('haai');\n\t}, configurable:true}\n)");
    }
View Full Code Here

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

    @Override
    @Test
    public void testSetAccessor_withNamespaceOverride()
    {
        // TODO (erikdebruin) see: testGetAccessor_withNamespaceOverride
        ISetterNode node = (ISetterNode) getAccessor("public override function set foo(value:int):void{super.foo();}");
        asBlockWalker.visitSetter(node);
        assertOut("Object.defineProperty(\n\tFalconTest_A.prototype, \n\t'foo', \n\t{set:function(value) {\n\t\tvar self = this;\n\t\tFalconTest_A.base(this, 'foo');\n\t}, configurable:true}\n)");
    }
View Full Code Here

    @Override
    @Test
    public void testSetAccessor_withStatic()
    {
        ISetterNode node = (ISetterNode) getAccessor("public static function set foo(value:int):void{}");
        asBlockWalker.visitSetter(node);
        assertOut("Object.defineProperty(\n\tFalconTest_A, \n\t'foo', \n\t{set:function(value) {\n\t}, configurable:true}\n)");
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.tree.as.ISetterNode

Copyright © 2018 www.massapicom. 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.