/** * Returns a method constant that uses an {@link AccessController} to look up this constant. * * @return A method constant that uses an {@link AccessController} to look up this constant. */ protected CanCache privileged() { return new PrivilegedLookup(methodDescription, methodName()); }
/** * {@inheritDoc} */ public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) { return new Compound( ClassConstant.of(methodDescription.getDeclaringType()), methodName(), ArrayFactory.forType(TypeDescription.Generic.OfNonGenericType.CLASS) .withValues(typeConstantsFor(methodDescription.getParameters().asTypeList().asErasures())), MethodInvocation.invoke(accessorMethod()) ).apply(methodVisitor, implementationContext); }