/** * Return the return type of the method accessor. */ @Override public Class getAttributeClass() { if (getGetMethod() == null) { return null; } return getGetMethodReturnType(); }
public Class getGetMethodReturnType() { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { return (Class)AccessController.doPrivileged(new PrivilegedGetMethodReturnType(getGetMethod())); } catch (PrivilegedActionException exception) { // we should not get here since this call does not throw any checked exceptions return null; } } else { return PrivilegedAccessHelper.getMethodReturnType(getGetMethod()); } }
/** * INTERNAL: * Return the GetMethod return type for this MethodAttributeAccessor. * A special check is made to determine if a missing method is a result of failed weaving. * @return */ // Note: SDO overrides this method and will handle a null GetMethod public Class getGetMethodReturnType() throws DescriptorException { // 323403: If the getMethod is missing - check for "_persistence_*_vh" to see if weaving was expected if(null == getGetMethod() && null != getGetMethodName() && (getGetMethodName().indexOf(Helper.PERSISTENCE_FIELDNAME_PREFIX) > -1)) { // warn before a possible NPE on accessing a weaved method that does not exist AbstractSessionLog.getLog().log(SessionLog.FINEST, "no_weaved_vh_method_found_verify_weaving_and_module_order", getGetMethodName(), null, this); // 323403: We cannot continue to process objects that are not weaved - if weaving is enabled // If we allow the getMethodReturnType to continue - we will throw an obscure NullPointerException throw DescriptorException.nullPointerWhileGettingValueThruMethodAccessorCausedByWeavingNotOccurringBecauseOfModuleOrder(getGetMethodName(), "", null); } if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { return AccessController.doPrivileged(new PrivilegedGetMethodReturnType(getGetMethod())); } catch (PrivilegedActionException exception) { // we should not get here since this call does not throw any checked exceptions return null; } } else { return PrivilegedAccessHelper.getMethodReturnType(getGetMethod()); } }
/** * INTERNAL: * Return the GetMethod return type for this MethodAttributeAccessor. * A special check is made to determine if a missing method is a result of failed weaving. * @return */ // Note: SDO overrides this method and will handle a null GetMethod public Class getGetMethodReturnType() throws DescriptorException { // 323403: If the getMethod is missing - check for "_persistence_*_vh" to see if weaving was expected if(null == getGetMethod() && null != getGetMethodName() && (getGetMethodName().indexOf(Helper.PERSISTENCE_FIELDNAME_PREFIX) > -1)) { // warn before a possible NPE on accessing a weaved method that does not exist AbstractSessionLog.getLog().log(SessionLog.FINEST, "no_weaved_vh_method_found_verify_weaving_and_module_order", getGetMethodName(), null, this); // 323403: We cannot continue to process objects that are not weaved - if weaving is enabled // If we allow the getMethodReturnType to continue - we will throw an obscure NullPointerException throw DescriptorException.nullPointerWhileGettingValueThruMethodAccessorCausedByWeavingNotOccurringBecauseOfModuleOrder(getGetMethodName(), "", null); } if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { return AccessController.doPrivileged(new PrivilegedGetMethodReturnType(getGetMethod())); } catch (PrivilegedActionException exception) { // we should not get here since this call does not throw any checked exceptions return null; } } else { return PrivilegedAccessHelper.getMethodReturnType(getGetMethod()); } }
/** * Return the return type of the method accessor. */ public Class getAttributeClass() { if (getGetMethod() == null) { return null; } return getGetMethodReturnType(); }
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { return AccessController.doPrivileged(new PrivilegedMethodInvoker(getGetMethod(), anObject, parameters)); } catch (PrivilegedActionException exception) { Exception throwableException = exception.getException();
/** * Return the return type of the method accessor. */ public Class getAttributeClass() { if (getGetMethod() == null) { return null; } return getGetMethodReturnType(); }
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { return AccessController.doPrivileged(new PrivilegedMethodInvoker(getGetMethod(), anObject, (Object[])null)); } catch (PrivilegedActionException exception) { Exception throwableException = exception.getException();
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { return AccessController.doPrivileged(new PrivilegedMethodInvoker(getGetMethod(), anObject, parameters)); } catch (PrivilegedActionException exception) { Exception throwableException = exception.getException();
Method method = methodAccessor.getGetMethod();
Method method = methodAccessor.getGetMethod();
if (accessor.isMethodAttributeAccessor()) { Method aMethod = ((MethodAttributeAccessor) accessor).getGetMethod(); if(null == aMethod) {