Examples of toGenericString()


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

            if (log.isDebugEnabled()) {
                log.debug("Exception invoking a method of " +
                        serviceImplClass.toString() + " of instance " +
                        serviceInstance.toString());
                log.debug("Exception type thrown: " + e.getClass().getName());
                log.debug("Method = " + target.toGenericString());
                for (int i = 0; i < methodInputParams.length; i++) {
                    String value = (methodInputParams[i] == null) ? "null" :
                            methodInputParams[i].getClass().toString();
                    log.debug(" Argument[" + i + "] is " + value);
                }
View Full Code Here

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

    public static void main(String[] args) throws Exception
    {
        Method m = FindTheParameterizedType.class.getMethod("method", Map.class, List.class);

        out.println(m.toString());
        out.println(m.toGenericString());

        Type[] types = m.getGenericParameterTypes();
        ParameterizedType pt = (ParameterizedType) types[0];

        Type keyType = pt.getActualTypeArguments()[0];
View Full Code Here

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

    public static void main(String[] args) throws Exception
    {
        Method m = FindTheParameterizedType.class.getMethod("method", Map.class, List.class);

        out.println(m.toString());
        out.println(m.toGenericString());

        Type[] types = m.getGenericParameterTypes();
        ParameterizedType pt = (ParameterizedType) types[0];

        Type keyType = pt.getActualTypeArguments()[0];
View Full Code Here

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

   
    // Look if method is getCoursesCatalog
    boolean cacheCollection = false;
    if(this.isCatalogCollection(method.getName(), pjp.getArgs())) cacheCollection = true;
   
    Object key = this.getMethodKey(method.toGenericString(), pjp.getArgs());
   
    Object result = null;
    //InternalCache internalCache = this.getCache(cacheName);
    MemcacheService syncCache = this.getCache(cacheName);
   
View Full Code Here

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

        if(o instanceof Course) {
          Course course = (Course) o;
          try {
            Method goalMethod =
                CourseServiceImpl.class.getMethod("getCourse", new Class[]{Long.class, Locale.class});
            String detailMethodName = goalMethod.toGenericString();
            Object[] params = new Object[] {course.getId(), getLocaleArg(args)};
            Object key = this.getMethodKey(detailMethodName, params);
            cache.put(key, course);
          } catch(NoSuchMethodException e) {
            LOGGER.severe(StackTraceUtil.getStackTrace(e));
View Full Code Here

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

      cacheName = "default";
    } finally {
     
    }
       
    Object key = this.getMethodKey(method.toGenericString(),pjp.getArgs());
    Object result = null;
    //InternalCache internalCache = this.getCache(cacheName);
    MemcacheService syncCache = this.getCache(cacheName);
   
    if(syncCache == null) {
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()

  public void shouldFoundASetter() throws Exception {
    final House aSimpleJavaBeans = new House();
    final List<Method> methodsOfHouseClass = Arrays.asList(House.class.getMethods());
    Method foundMethod = new ReflectionBasedNullHandler(proxifier).findSetter(aSimpleJavaBeans, "Mouse", Mouse.class);
    assertThat(methodsOfHouseClass, hasItem(foundMethod));
    assertThat(foundMethod.toGenericString(), startsWith("public void "));
    assertThat(foundMethod.getName(), is(startsWith("setMouse")));
  }


  @Test
View Full Code Here

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

    final House aSimpleJavaBeans = new House();
    House beanProxified = proxify(aSimpleJavaBeans);
    final List<Method> methodsOfHouseClass = Arrays.asList(House.class.getMethods());
    Method foundMethod = new ReflectionBasedNullHandler(proxifier).findSetter(beanProxified, "Mouse", Mouse.class);
    assertThat(methodsOfHouseClass, hasItem(foundMethod));
    assertThat(foundMethod.toGenericString(), startsWith("public void "));
    assertThat(foundMethod.getName(), is(startsWith("setMouse")));
  }


  @Test
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
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.