Package org.adjective.syntactic.parser.util

Examples of org.adjective.syntactic.parser.util.ModifierSet


            final ASTMember member = element.getMember();
            if (member.getMember().getMemberType() != MemberType.METHOD)
            {
                continue;
            }
            ModifierSet modifiers = getModifiers(member);
            result.add(new ASTMethodInfo(modifiers, (ASTMethodDeclaration) member.getMember(), this));
        }
        return result.toArray(new ASTMethodInfo[result.size()]);
    }
View Full Code Here


        return result.toArray(new ASTMethodInfo[result.size()]);
    }

    private ModifierSet getModifiers(final ASTMember member)
    {
        ModifierSet modifiers = member.getModifiers();
        if (this._declaration.isInterface())
        {
            modifiers = new ModifierSet(modifiers);
            modifiers.set(ModifierSet.Modifier.ABSTRACT);
            modifiers.set(ModifierSet.Modifier.PUBLIC);
        }
        return modifiers;
    }
View Full Code Here

        {
            throw new IllegalArgumentException("[Internal Error] Lookup cannot be null");
        }
        _method = method;
        _parameterLookup = lookup;
        _modifiers = new ModifierSet(modifiers);
        if (isDeclaredOnObject())
        {
            _modifiers.clear(ModifierSet.Modifier.ABSTRACT);
        }
    }
View Full Code Here

    public void setFinal(boolean isFinal)
    {
        if (_modifiers == null)
        {
            _modifiers = new ModifierSet();
            if (isFinal)
            {
                _modifiers.set(ModifierSet.Modifier.FINAL);
            }
        }
View Full Code Here

    }

    protected ExpressionNode makeAnonymousInnerClass(final JavaType interfaceType, final MethodInfo functionalMethod,
                                                     final ASTMethodDeclaration methodImpl)
    {
        final ModifierSet set = new ModifierSet(ModifierSet.Modifier.PUBLIC);
        final ASTModifiers modifiers = new ASTModifiers(set);
        final ASTMember member = new ASTMember(modifiers, methodImpl);
        final JavaType astType = substituteType(methodImpl.getParameters(), functionalMethod, interfaceType);
        ASTClassOrInterfaceBody body = new ASTClassOrInterfaceBody(new ASTClassOrInterfaceBodyElement(member));
        return new ASTAllocationExpression(JavaTypeUtil.withoutWildcard(astType), new ASTArguments(), body);
View Full Code Here

    }

    @Override
    public ModifierSet getModifiers()
    {
        final ModifierSet modifiers = new ModifierSet(_method.getModifiers());
        if (isDeclaredOnObject())
        {
            modifiers.clear(ModifierSet.Modifier.ABSTRACT);
        }
        return modifiers;
    }
View Full Code Here

        _modifiers = null;
    }

    public ASTModifiers(final ASTModifiers clone)
    {
        this(new ModifierSet(clone.getModifiers()));
        setChildren(clone.children());
    }
View Full Code Here

    public void setModifiers(ModifierSet modifiers)
    {
        if (_modifiers == null)
        {
            _modifiers = new ModifierSet(modifiers);
        }
        else
        {
            throw new IllegalStateException("Modifiers have already been set");
        }
View Full Code Here

TOP

Related Classes of org.adjective.syntactic.parser.util.ModifierSet

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.