Package net.sourceforge.javautil.common.proxy

Examples of net.sourceforge.javautil.common.proxy.DefaultReturnValue


      if (cm != null) target = cm.getJavaMember(); else target = null;
    }
   
    Object returnValue = null;
    if (target == null) {
      DefaultReturnValue drv = method.getAnnotation(DefaultReturnValue.class);
      if (drv != null) {
        returnValue = drv.value();
      } else {
        returnValue = method.getReturnType().isPrimitive() ? ReflectionUtil.getPrimitiveDefault(method.getReturnType()) : null;
      }
    } else {
      returnValue = super.invoke(proxy, target, args);
View Full Code Here


   
    if (method.getReturnType() == void.class) return null;
    if (returnValue != null && method.getReturnType().isInstance(returnValue))
      return returnValue;
   
    DefaultReturnValue drv = method.getAnnotation(DefaultReturnValue.class);
    if (drv != null) {
      return ReflectionUtil.coerceString(method.getReturnType(), drv.value());
    } else if (method.getReturnType().isPrimitive()) {
      return ReflectionUtil.getPrimitiveDefault(method.getReturnType());
    }
   
    return null;
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.common.proxy.DefaultReturnValue

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.