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

Examples of org.apache.flex.compiler.internal.tree.as.ScopedBlockNode.addItem()


        ifContents.addItem(assignmentBytes);

        // generate: return bytes;
        ReturnNode returnStmt = new ReturnNode(null);
        returnStmt.setStatementExpression(new IdentifierNode("bytes"));
        movieClipDataContents.addItem(returnStmt);

        classNodeMovieContents.addItem(movieClipDataGetterNode);

        fileNode.runPostProcess(EnumSet.of(PostProcessStep.POPULATE_SCOPE));
View Full Code Here


        PackageNode packageNode = new PackageNode(new IdentifierNode(""), null);
        fileNode.addItem(packageNode);

        ScopedBlockNode contents = packageNode.getScopedNode();
        ImportNode importNode = ImportNode.buildImportNode(getBaseClassQName());
        contents.addItem(importNode);

        ClassNode classNode = new ClassNode(new IdentifierNode(data.getQName()));
        classNode.setBaseClass(new IdentifierNode(getBaseClassName()));
        classNode.setNamespace(new NamespaceIdentifierNode(INamespaceConstants.public_));
        contents.addItem(classNode);
View Full Code Here

        contents.addItem(importNode);

        ClassNode classNode = new ClassNode(new IdentifierNode(data.getQName()));
        classNode.setBaseClass(new IdentifierNode(getBaseClassName()));
        classNode.setNamespace(new NamespaceIdentifierNode(INamespaceConstants.public_));
        contents.addItem(classNode);

        fileNode.runPostProcess(EnumSet.of(PostProcessStep.POPULATE_SCOPE));

        return fileNode;
    }
View Full Code Here

        ScopedBlockNode contents = packageNode.getScopedNode();

        ClassNode classNode = new ClassNode(new IdentifierNode(data.getQName()));
        classNode.setNamespace(new NamespaceIdentifierNode(INamespaceConstants.public_));
        contents.addItem(classNode);

        // generate: public static var data:XML = ${XML_DATA};
        VariableNode variableNodeData = new VariableNode(new IdentifierNode("data"));
        variableNodeData.setNamespace(new NamespaceIdentifierNode(INamespaceConstants.public_));
        variableNodeData.addModifier(new ModifierNode(IASKeywordConstants.STATIC));
View Full Code Here

        PackageNode packageNode = new PackageNode(new IdentifierNode(""), null);
        fileNode.addItem(packageNode);

        ScopedBlockNode packageContents = packageNode.getScopedNode();
        ImportNode importNode = ImportNode.buildImportNode(getBaseClassQName());
        packageContents.addItem(importNode);
        importNode = ImportNode.buildImportNode("mx.core.IFlexAsset");
        packageContents.addItem(importNode);
        importNode = ImportNode.buildImportNode("flash.utils.ByteArray");
        packageContents.addItem(importNode);
        importNode = ImportNode.buildImportNode("flash.display.Shader");
View Full Code Here

        ScopedBlockNode packageContents = packageNode.getScopedNode();
        ImportNode importNode = ImportNode.buildImportNode(getBaseClassQName());
        packageContents.addItem(importNode);
        importNode = ImportNode.buildImportNode("mx.core.IFlexAsset");
        packageContents.addItem(importNode);
        importNode = ImportNode.buildImportNode("flash.utils.ByteArray");
        packageContents.addItem(importNode);
        importNode = ImportNode.buildImportNode("flash.display.Shader");
        packageContents.addItem(importNode);
View Full Code Here

        ImportNode importNode = ImportNode.buildImportNode(getBaseClassQName());
        packageContents.addItem(importNode);
        importNode = ImportNode.buildImportNode("mx.core.IFlexAsset");
        packageContents.addItem(importNode);
        importNode = ImportNode.buildImportNode("flash.utils.ByteArray");
        packageContents.addItem(importNode);
        importNode = ImportNode.buildImportNode("flash.display.Shader");
        packageContents.addItem(importNode);

        // generate the byte array class name
        String byteArrayClassName = data.getQName() + byteArrayNamePostfix;
View Full Code Here

        importNode = ImportNode.buildImportNode("mx.core.IFlexAsset");
        packageContents.addItem(importNode);
        importNode = ImportNode.buildImportNode("flash.utils.ByteArray");
        packageContents.addItem(importNode);
        importNode = ImportNode.buildImportNode("flash.display.Shader");
        packageContents.addItem(importNode);

        // generate the byte array class name
        String byteArrayClassName = data.getQName() + byteArrayNamePostfix;
        ClassNode classNodeByteArray = new ClassNode(new IdentifierNode(byteArrayClassName));
        classNodeByteArray.setBaseClass(new IdentifierNode(getBaseClassName()));
View Full Code Here

        // generate the byte array class name
        String byteArrayClassName = data.getQName() + byteArrayNamePostfix;
        ClassNode classNodeByteArray = new ClassNode(new IdentifierNode(byteArrayClassName));
        classNodeByteArray.setBaseClass(new IdentifierNode(getBaseClassName()));
        classNodeByteArray.setNamespace(new NamespaceIdentifierNode(INamespaceConstants.public_));
        packageContents.addItem(classNodeByteArray);

        // generate the pbj class name
        String pbjClassName = data.getQName();
        ClassNode classNodePbj = new ClassNode(new IdentifierNode(pbjClassName));
        classNodePbj.setBaseClass(new IdentifierNode("Shader"));
View Full Code Here

        String pbjClassName = data.getQName();
        ClassNode classNodePbj = new ClassNode(new IdentifierNode(pbjClassName));
        classNodePbj.setBaseClass(new IdentifierNode("Shader"));
        classNodePbj.addInterface(new IdentifierNode("IFlexAsset"));
        classNodePbj.setNamespace(new NamespaceIdentifierNode(INamespaceConstants.public_));
        packageContents.addItem(classNodePbj);

        // build the constructor
        IdentifierNode constructorNameNode = new IdentifierNode(pbjClassName);
        constructorNameNode.setReferenceValue(classNodePbj.getDefinition());
        FunctionNode constructorNode = new FunctionNode(null, constructorNameNode);
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.