Examples of addITraitsMethod()


Examples of org.apache.flex.compiler.internal.abc.ClassGeneratorHelper.addITraitsMethod()

        Name getContentsMethodName = new Name(ABCConstants.CONSTANT_Qname,
                new Nsset(classGen.getProtectedNamespace()), "getContent");

        //Create getContents method
        classGen.addITraitsMethod(getContentsMethodName, Collections.<Name> emptyList(),
                new Name(IASLanguageConstants.Object), Collections.<Object> emptyList(),
                false, false, true, bodyInstructionList);

        classGen.finishScript();
    }
View Full Code Here

Examples of org.apache.flex.compiler.internal.abc.ClassGeneratorHelper.addITraitsMethod()

                Collection<Name> paramTypes = new ImmutableList.Builder<Name>()
                .add(numberName)
                .add(numberName)
                .build();

                classGen.addITraitsMethod(new Name("move"), paramTypes, new Name("void"), Collections.<Object>emptyList(), false, false, false, body);
            }

            // generate:
            // public function setActualSize(newWidth:Number, newHeight:Number):void
            // {
View Full Code Here

Examples of org.apache.flex.compiler.internal.abc.ClassGeneratorHelper.addITraitsMethod()

                Collection<Name> paramTypes = new ImmutableList.Builder<Name>()
                .add(numberName)
                .add(numberName)
                .build();

                classGen.addITraitsMethod(new Name("setActualSize"), paramTypes, new Name("void"), Collections.<Object>emptyList(), false, false, false, body);
            }
        }

        // generate:
        // override public function toString():String
View Full Code Here

Examples of org.apache.flex.compiler.internal.abc.ClassGeneratorHelper.addITraitsMethod()

            body.addInstruction(ABCConstants.OP_callproperty, displayObjectToString);
            body.addInstruction(ABCConstants.OP_returnvalue);

            TypeDefinitionBase stringDef = (TypeDefinitionBase)project.getBuiltinType(BuiltinType.STRING);
            Name stringName = stringDef.getMName(project);
            classGen.addITraitsMethod(new Name("toString"), Collections.<Name>emptyList(), stringName, Collections.<Object>emptyList(), false, false, true, body);
        }

        classGen.finishScript();

        try
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.