Package org.adjective.syntactic.parser.type

Examples of org.adjective.syntactic.parser.type.JavaType


        }
    }

    private JavaType getType(final JavaType type)
    {
        final JavaType typeParameter = _parameterLookup.findParameter(type.getTypeName());
        if (typeParameter != null)
        {
            return typeParameter;
        }
        else
View Full Code Here


        final JavaType[] types = _method.getParameters().getParameterTypes();
        final Integer[] vals = new Integer[types.length];

        for (int i = 0; i < vals.length; i++)
        {
            final JavaType type = types[i];
            if (type == null)
            {
                throw new IllegalStateException("[Internal Error] AST Method " + _method.getDebugInfo()
                                                        + " has no type for parameter " + i);
            }
            final Integer lookup = _parameterLookup.findParameterIndex(type.getTypeName());
            if (lookup != null)
            {
                vals[i] = lookup;
            }
        }
View Full Code Here

                                                     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

        return javaTypes;
    }

    private JavaType getJavaType(final Type parameter, final Class<?> cls)
    {
        final JavaType javaType;
        if (parameter instanceof TypeVariable)
        {
            javaType = lookup((TypeVariable) parameter);
        }
        else
View Full Code Here

        return javaType;
    }

    private JavaType lookup(final TypeVariable var)
    {
        final JavaType type = this._parameterLookup.findParameter(var.getName());
        return type != null ? type : new ClassType(Object.class);
    }
View Full Code Here

TOP

Related Classes of org.adjective.syntactic.parser.type.JavaType

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.