Package org.apache.flex.abc.visitors

Examples of org.apache.flex.abc.visitors.ITraitVisitor.visitAttribute()


    {
        ITraitVisitor traitVisitor =
            itraits.visitMethodTrait(TRAIT_Method, methodName, 0, methodInfo);
       
        if (isOverride)
            traitVisitor.visitAttribute(Trait.TRAIT_OVERRIDE, true);
    }
   
    /**
     * Adds an instance trait for a variable,
     * such as one created by an id attribute.
View Full Code Here


    {
        final ITraitVisitor traitVisitor =
                itraits.visitMethodTrait(TRAIT_Getter, methodName, 0, methodInfo);

        if (isOverride)
            traitVisitor.visitAttribute(Trait.TRAIT_OVERRIDE, true);
    }

    /**
     * Adds a setter method trait to the generated class.
     *
 
View Full Code Here

    {
        final ITraitVisitor traitVisitor =
                itraits.visitMethodTrait(TRAIT_Setter, methodName, 0, methodInfo);

        if (isOverride)
            traitVisitor.visitAttribute(Trait.TRAIT_OVERRIDE, true);
    }

   
    /**
     * A variant of the generateMethodBody() in ABCGenerator.
View Full Code Here

    {
        ITraitVisitor traitVisitor = addMethodToTraits(itraits, methodName, parameterTypes,
                returnType, defaultParameterValues, needsRest, functionKindTrait, body);
        traitVisitor.visitStart();
        if (isFinal)
            traitVisitor.visitAttribute(Trait.TRAIT_FINAL, true);
        if (isOverride)
            traitVisitor.visitAttribute(Trait.TRAIT_OVERRIDE, true);
        traitVisitor.visitEnd();
    }
View Full Code Here

                returnType, defaultParameterValues, needsRest, functionKindTrait, body);
        traitVisitor.visitStart();
        if (isFinal)
            traitVisitor.visitAttribute(Trait.TRAIT_FINAL, true);
        if (isOverride)
            traitVisitor.visitAttribute(Trait.TRAIT_OVERRIDE, true);
        traitVisitor.visitEnd();
    }

    /**
     * Utility method to add a static method to the generated class.
View Full Code Here

       
        // If we have an IMetaTagsNode use that, otherwise get the metadata from the definition
            processMetadata(getterTv, metaTags);

            if (bindableVarDef.isOverride())
                getterTv.visitAttribute(Trait.TRAIT_OVERRIDE, Boolean.TRUE);

        // We don't codegen classes in parallel right now,
        // so we know that we are on the main code generation thread
        // because bindable variables are always members of a class.
        // Since we know are on the main code generation thread we can immediately
View Full Code Here

        metaTags = MetaTag.addMetaTag(metaTags, gotoDefinitionMetaTag);
       
        processMetadata(setterTv, metaTags);
       
        if (bindableVarDef.isOverride())
            setterTv.visitAttribute(Trait.TRAIT_OVERRIDE, Boolean.TRUE);

        setterTv.visitEnd();
    }

    /**
 
View Full Code Here

            FunctionGeneratorHelper.generateFunction(classScope.getEmitter(), mi, insns);

            NamespaceDefinition nd = (NamespaceDefinition)classDefinition.getProtectedNamespaceReference();
            Name func_name = new Name(nd.getAETNamespace(), "skinParts");
            tv = classScope.traitsVisitor.visitMethodTrait(TRAIT_Getter, func_name, 0, mi);
            tv.visitAttribute(Trait.TRAIT_OVERRIDE, Boolean.TRUE);
            tv.visitEnd();

        }
       
        // the generation of instructions for variable initialization is delayed
View Full Code Here

                        this.iinfo.flags |= ABCConstants.CLASS_FLAG_protected;

                ls.processMetadata(tv, getAllMetaTags(funcDef));
               
                if ( func.hasModifier(ASModifier.FINAL))
                    tv.visitAttribute(Trait.TRAIT_FINAL, Boolean.TRUE);
                // don't set override if we've moved it to the bindable namespace
                if (!wasOverride && (func.hasModifier(ASModifier.OVERRIDE) || funcDef.isOverride()))
                    tv.visitAttribute(Trait.TRAIT_OVERRIDE, Boolean.TRUE);
                tv.visitEnd();
            }
View Full Code Here

               
                if ( func.hasModifier(ASModifier.FINAL))
                    tv.visitAttribute(Trait.TRAIT_FINAL, Boolean.TRUE);
                // don't set override if we've moved it to the bindable namespace
                if (!wasOverride && (func.hasModifier(ASModifier.OVERRIDE) || funcDef.isOverride()))
                    tv.visitAttribute(Trait.TRAIT_OVERRIDE, Boolean.TRUE);
                tv.visitEnd();
            }
        }
        if (isBindable)
        {
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.