Examples of toGenericString()


Examples of java.lang.reflect.Field.toGenericString()

    }

    @Override
    public void visitAbstractField(AbstractField field) {
        final Field f = field.getField();
        checkParameter(field.getParameters().get(0), f, f.toGenericString(), f.getName());
    }

    @Override
    public void visitAbstractSetterMethod(AbstractSetterMethod setterMethod) {
        final Method m = setterMethod.getMethod();
View Full Code Here

Examples of java.lang.reflect.Field.toGenericString()

        // TODO check parameters
    }

    public void visitAbstractField(AbstractField field) {
        final Field f = field.getField();
        checkParameter(field.getParameters().get(0), f, f.toGenericString(), f.getName());
    }

    public void visitAbstractSetterMethod(AbstractSetterMethod setterMethod) {
        final Method m = setterMethod.getMethod();
        checkParameter(setterMethod.getParameters().get(0), m, m.toGenericString(), "1");
View Full Code Here

Examples of java.lang.reflect.Method.toGenericString()

        Assert.assertTrue(Modifier.isStatic(field.getModifiers()));

        Assert.assertTrue(Resource.class.isAssignableFrom(cls));

        Method m = cls.getMethod("getList", List.class);
        System.out.println(m.toGenericString());
        Type type = m.getGenericParameterTypes()[0];
        Assert.assertTrue(type instanceof ParameterizedType);
        ParameterizedType pType = (ParameterizedType)type;
        Assert.assertEquals(String.class, pType.getActualTypeArguments()[0]);
View Full Code Here

Examples of java.lang.reflect.Method.toGenericString()

        if (method != null)
            try {
                method.invoke(source, evt);
            } catch (Exception e) {
                throw new RuntimeException("Invocation Failed. " + evt.getPropertyName() + " - " + method.toGenericString(), e);
            }
    }
}
View Full Code Here

Examples of java.lang.reflect.Method.toGenericString()

        Assert.assertTrue(Modifier.isStatic(field.getModifiers()));

        Assert.assertTrue(Resource.class.isAssignableFrom(cls));

        Method m = cls.getMethod("getList", List.class);
        System.out.println(m.toGenericString());
        Type type = m.getGenericParameterTypes()[0];
        Assert.assertTrue(type instanceof ParameterizedType);
        ParameterizedType pType = (ParameterizedType)type;
        Assert.assertEquals(String.class, pType.getActualTypeArguments()[0]);
View Full Code Here

Examples of java.lang.reflect.Method.toGenericString()

    public String toString()
    {
        if (object instanceof Method)
        {
            Method method = (Method) object;
            return "(method=" + method.toGenericString() + ", parameter: " + parameterNumber + ")";
        }
        else if (object instanceof Constructor<?>)
        {
            Constructor<?> ctor = (Constructor<?>) object;
            return "(method=" + ctor.toGenericString() + ", parameter: " + parameterNumber + ")";
View Full Code Here

Examples of java.lang.reflect.Method.toGenericString()

                    // Ensure the method has only the one parameter
                    if (method.getParameterTypes().length != 1) {
                        throw new StripesRuntimeException(
                            "A method marked with @Reference must have exactly one parameter: " +
                            "the bean to be injected. Method [" + method.toGenericString() + "] has " +
                            method.getParameterTypes().length + " parameters."
                        );
                    }
                }
            }
View Full Code Here

Examples of java.lang.reflect.Method.toGenericString()

                    // Ensure the method has only the one parameter
                    if (method.getParameterTypes().length != 1) {
                        throw new StripesRuntimeException(
                            "A method marked with @SpringBean must have exactly one parameter: " +
                            "the bean to be injected. Method [" + method.toGenericString() + "] has " +
                            method.getParameterTypes().length + " parameters."
                        );
                    }
                }
            }
View Full Code Here

Examples of java.lang.reflect.Method.toGenericString()

    }

    @Override
    public void visitAbstractSetterMethod(AbstractSetterMethod setterMethod) {
        final Method m = setterMethod.getMethod();
        checkParameter(setterMethod.getParameters().get(0), m, m.toGenericString(), "1");
    }

    @Override
    public void visitAbstractResourceMethod(AbstractResourceMethod method) {
        checkParameters(method, method.getMethod());
View Full Code Here

Examples of java.lang.reflect.Method.toGenericString()

        final Method handlingMethod = invocable.getHandlingMethod();
        int paramCount = 0;
        int nonAnnotetedParameters = 0;

        for (Parameter p : invocable.getParameters()) {
            validateParameter(p, handlingMethod, handlingMethod.toGenericString(), Integer.toString(++paramCount), false);
            if (method.getType() == ResourceMethod.JaxrsType.SUB_RESOURCE_LOCATOR
                    && Parameter.Source.ENTITY == p.getSource()) {
                Errors.fatal(method, LocalizationMessages.SUBRES_LOC_HAS_ENTITY_PARAM(invocable.getHandlingMethod()));
            } else if (p.getAnnotations().length == 0) {
                nonAnnotetedParameters++;
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.