Package org.apache.flex.compiler.scopes

Examples of org.apache.flex.compiler.scopes.IDefinitionSet


        for (String name : names)
        {
            sb.append(name);
            sb.append('\n');
           
            IDefinitionSet set = getDefinitionSetByName(name);
            int n = set.getSize();
            for (int i = 0; i < n; i++)
            {
                IDefinition d = set.getDefinition(i);
                sb.append("  ");
                sb.append(d.toString());
                sb.append('\n');
            }
        }
View Full Code Here


        final String baseName = getBaseName();
        final boolean isInterface = type instanceof IInterfaceDefinition;

        // Look at the type's local definitions that have the same name as this function.
        final IASScope typeScope = type.getContainedScope();
        final IDefinitionSet definitionSet = typeScope.getLocalDefinitionSetByName(baseName);
        final int n = definitionSet != null ? definitionSet.getSize() : 0;
        for (int i = 0; i < n; i++)
        {
            IDefinition member = definitionSet.getDefinition(i);
           
            // Just look at functions.
            if (member instanceof FunctionDefinition)
            {
                // If one has the same signature as this function, return it.
View Full Code Here

        if (thisNamespaceDef == null)
            return null;
        final boolean isBindable = ((NamespaceDefinition)thisNamespaceDef).getAETNamespace().getName().equals(
                                    BindableHelper.bindableNamespaceDefinition.getAETNamespace().getName());

        final IDefinitionSet definitionSet = scope.getLocalDefinitionSetByName(name);

        if (definitionSet == null)
            return null;

        final int n = definitionSet.getSize();
        for (int i = 0; i < n; i++)
        {
            IDefinition d = definitionSet.getDefinition(i);
            if (d instanceof IAccessorDefinition)
            {
                final IAccessorDefinition definition = (IAccessorDefinition)d;
               
                // If this is a static accessor, we want another static accessor.
View Full Code Here

            return true;

        // Just get the def set and iterate over the result looking for a package.
        // Common cases are the string isn't found, or the def set will contain
        // 1 definition so iterating over it isn't a problem.
        IDefinitionSet defSet = getLocalDefinitionSetByName(p);
        if (defSet != null)
        {
            int n = defSet.getSize();
            for (int i = 0; i < n; i++)
            {
                IDefinition def = defSet.getDefinition(i);
                if (def instanceof IPackageDefinition)
                {
                    IPackageDefinition packageDef = (IPackageDefinition)def;
                    if (p.equals(packageDef.getBaseName()))
                        return true;
View Full Code Here

     * @param getContingents If true, non-contingent definitions are ignored. If
     * false, contingent definitions are ignored.
     */
    protected final void getLocalProperty(ICompilerProject project, Collection<IDefinition> defs, String baseName, boolean getContingents)
    {
        IDefinitionSet defSet = getLocalDefinitionSetByName(baseName);
        if (defSet != null)
        {
            int nDefs = defSet.getSize();
            for (int i = 0; i < nDefs; ++i)
            {
                IDefinition definition = defSet.getDefinition(i);
                if ((!definition.isContingent() || (getContingents && isContingentDefinitionNeeded(project, definition))))
                {
                    defs.add(definition);
                }
            }
View Full Code Here

        Collection<String> names = getAllLocalNames();
        for (String name : names)
        {
            // Don't call getDefinitionSetByName() on the scope, because
            // for a project scope this would actualize every DefinitionPromise.
            IDefinitionSet definitionSet = definitionStore.getDefinitionSetByName(name);
            int n = definitionSet.getSize();
            for (int i = 0; i < n; i++)
            {
                IDefinition definition = definitionSet.getDefinition(i);
                ((DefinitionBase)definition).verify();
            }
        }

        return true;
View Full Code Here

            sb.append('\n');

            // Get the set of definitions with this name.
            // Don't call getDefinitionSetByName() on the scope, because
            // for a project scope this would actualize every DefinitionPromise.
            IDefinitionSet set = definitionStore.getDefinitionSetByName(name);

            int n = set.getSize();
            for (int i = 0; i < n; i++)
            {
                IDefinition d = set.getDefinition(i);
                indent(sb, level);
                sb.append(' ');
                sb.append(' ');
                sb.append(' ');
                sb.append(' ');
View Full Code Here

     * node
     */
    void reconnectDef(ASScope containingScope)
    {
        String baseName = getName();
        IDefinitionSet s = containingScope.getLocalDefinitionSetByName(baseName);
        if (s != null)
        {
            for (int i = 0, l = s.getSize(); i < l; ++i)
            {
                IDefinition d = s.getDefinition(i);
                if (d.getAbsoluteStart() == this.getAbsoluteStart())
                {
                    this.setDefinition(d);
                    ((DefinitionBase)d).setNode(this);
                }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.scopes.IDefinitionSet

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.