@Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); if (getModifiers() != EMPTY_MASK) { stringBuilder.append(Modifier.toString(getModifiers())).append(' '); } stringBuilder.append(getType().asErasure().getActualName()).append(' '); stringBuilder.append(getDeclaringType().asErasure().getActualName()).append('.'); return stringBuilder.append(getName()).toString(); } }
/** * {@inheritDoc} */ public StackManipulation resolve(TypeDescription targetType, ByteCodeElement target, TypeList.Generic parameters, TypeDescription.Generic result) { List<StackManipulation> stackManipulations = new ArrayList<StackManipulation>(parameters.size()); for (int index = parameters.size() - 1; index >= 0; index--) { stackManipulations.add(Removal.of(parameters.get(index))); } return new StackManipulation.Compound(CompoundList.of(stackManipulations, DefaultValue.of(result.asErasure()))); } }
/** * {@inheritDoc} */ public StackManipulation ofIndex(TypeDescription parameterType, int index) { TypeDescription targetType = bridgeTarget.getParameters().get(index).getType().asErasure(); return parameterType.equals(targetType) ? Trivial.INSTANCE : TypeCasting.to(targetType); } }
/** * {@inheritDoc} */ public String apply(TypeDescription instrumentedType, MethodDescription instrumentedMethod) { return instrumentedMethod.getReturnType().asErasure().getName(); } }
/** * Creates a generic access dispatcher for a given method. * * @param methodDescription The generically resolved return type of the method. * @param invocation The invocation of the method in its defined shape. * @return A method access dispatcher for the given method. */ protected static WithImplicitInvocationTargetType of(MethodDescription methodDescription, WithImplicitInvocationTargetType invocation) { return new OfGenericMethod(methodDescription.getReturnType().asErasure(), invocation); }
/** * Resolves this argument provider. * * @param access The stack manipulation for accessing the argument value. * @param type The type of the loaded value. * @param assigner The assigner to use. * @param typing The typing required. * @return A resolved version of this arguments provider. */ protected Resolved doResolve(StackManipulation access, TypeDescription.Generic type, Assigner assigner, Assigner.Typing typing) { return new Resolved.Simple(access, type.asErasure()); }
/** * {@inheritDoc} */ public MethodDelegationBinder.MethodInvoker invoke() { return new MethodDelegationBinder.MethodInvoker.Virtual(methodDescription.getReturnType().asErasure()); }
/** * {@inheritDoc} */ public TypeToken asTypeToken() { return new TypeToken(getReturnType().asErasure(), getParameters().asTypeList().asErasures()); }
/** * {@inheritDoc} */ public SignatureToken asSignatureToken() { return new SignatureToken(getInternalName(), getReturnType().asErasure(), getParameters().asTypeList().asErasures()); }
/** * {@inheritDoc} */ public TypeDescription asErasure() { return rawInterface.asErasure(); }
/** * {@inheritDoc} */ public TypeDescription asErasure() { return delegate.asErasure().getSuperClass().asErasure(); }
/** * {@inheritDoc} */ public TypeDescription asErasure() { return parameterizedType.asErasure(); }
/** * {@inheritDoc} */ public TypeDescription asErasure() { return ArrayProjection.of(getComponentType().asErasure(), 1); }
/** * {@inheritDoc} */ public Generic onParameterizedType(Generic parameterizedType) { return declaringType.isGenerified() ? new Generic.OfNonGenericType.Latent(parameterizedType.asErasure(), parameterizedType) : parameterizedType; }
/** * {@inheritDoc} */ public Generic onNonGenericType(Generic typeDescription) { TypeDescription erasure = typeDescription.asErasure(); return erasure.isGenerified() ? new OfNonGenericType.ForReifiedErasure(erasure) : typeDescription; } }
/** * {@inheritDoc} */ public Boolean onNonGenericType(Generic typeDescription) { return this.typeDescription.isAssignableFrom(typeDescription.asErasure()); } }
/** * {@inheritDoc} */ public Generic onNonGenericType(Generic typeDescription) { return typeDescription.isArray() ? new OfGenericArray.Latent(onNonGenericType(typeDescription.getComponentType()), Empty.INSTANCE) : new OfNonGenericType.Latent(typeDescription.asErasure(), Empty.INSTANCE); }
/** * Returns a method type description of the given method. * * @param methodDescription The method to extract the method type from. * @return The method type of the given method. */ public static MethodType of(MethodDescription methodDescription) { return new MethodType(methodDescription.getReturnType().asErasure(), methodDescription.getParameters().asTypeList().asErasures()); }
/** * {@inheritDoc} */ public TypeDescription getTypeDescription() { return fieldDescription.getType().asErasure(); }
/** * {@inheritDoc} */ public String subclass(TypeDescription.Generic superClass) { return name(superClass.asErasure()); }