@Override public MethodHandle getHandle() { plasticClass.check(); if (handle == null) { methodIndex = plasticClass.nextMethodIndex++; handle = new MethodHandleImpl(plasticClass.className, description.toString(), methodIndex); plasticClass.shimMethods.add(this); } return handle; }
@Override public MethodHandle getHandle() { plasticClass.check(); if (handle == null) { methodIndex = plasticClass.nextMethodIndex++; handle = new MethodHandleImpl(plasticClass.className, description.toString(), methodIndex); plasticClass.shimMethods.add(this); } return handle; }
private void introduceAccessorMethod(String returnType, String name, String[] parameterTypes, String signature, InstructionBuilderCallback callback) { MethodDescription description = new MethodDescription(Opcodes.ACC_PUBLIC, returnType, name, parameterTypes, signature, null); String desc = plasticClass.nameCache.toDesc(description); if (plasticClass.inheritanceData.isImplemented(name, desc)) { throw new IllegalArgumentException(String.format( "Unable to create new accessor method %s on class %s as the method is already implemented.", description.toString(), plasticClass.className)); } plasticClass.introduceMethod(description, callback); }
private void introduceAccessorMethod(String returnType, String name, String[] parameterTypes, String signature, InstructionBuilderCallback callback) { MethodDescription description = new MethodDescription(Opcodes.ACC_PUBLIC, returnType, name, parameterTypes, signature, null); String desc = plasticClass.nameCache.toDesc(description); if (plasticClass.inheritanceData.isImplemented(name, desc)) { throw new IllegalArgumentException(String.format( "Unable to create new accessor method %s on class %s as the method is already implemented.", description.toString(), plasticClass.className)); } plasticClass.introduceMethod(description, callback); }