/** * Sets <code>signature_index</code> to the index of the given generic signature, * which is added to a constant pool. * * @param sig new signature. * @since 3.11 */ public void setSignature(String sig) { int index = getConstPool().addUtf8Info(sig); ByteArray.write16bit(index, info, 0); }
/** * Sets <code>signature_index</code> to the index of the given generic signature, * which is added to a constant pool. * * @param sig new signature. * @since 3.11 */ public void setSignature(String sig) { int index = getConstPool().addUtf8Info(sig); ByteArray.write16bit(index, info, 0); }
/** * Returns the generic signature indicated by <code>signature_index</code>. * * @see #toClassSignature(String) * @see #toMethodSignature(String) * @see #toFieldSignature(String) */ public String getSignature() { return getConstPool().getUtf8Info(ByteArray.readU16bit(get(), 0)); }
/** * Returns the generic signature indicated by <code>signature_index</code>. * * @see #toClassSignature(String) * @see #toMethodSignature(String) * @see #toFieldSignature(String) */ public String getSignature() { return getConstPool().getUtf8Info(ByteArray.readU16bit(get(), 0)); }
/** * Sets <code>signature_index</code> to the index of the given generic signature, * which is added to a constant pool. * * @param sig new signature. * @since 3.11 */ public void setSignature(String sig) { int index = getConstPool().addUtf8Info(sig); ByteArray.write16bit(index, info, 0); }
/** * Sets <code>signature_index</code> to the index of the given generic signature, * which is added to a constant pool. * * @param sig new signature. * @since 3.11 */ public void setSignature(String sig) { int index = getConstPool().addUtf8Info(sig); ByteArray.write16bit(index, info, 0); }
/** * Sets <code>signature_index</code> to the index of the given signature, * which is added to a constant pool. * * @param sig new signature. * @since 3.11 */ public void setSignature(String sig) { int index = getConstPool().addUtf8Info(sig); ByteArray.write16bit(index, info, 0); }
/** * Sets <code>signature_index</code> to the index of the given generic signature, * which is added to a constant pool. * * @param sig new signature. * @since 3.11 */ public void setSignature(String sig) { int index = getConstPool().addUtf8Info(sig); ByteArray.write16bit(index, info, 0); }
/** * Returns the signature indicated by <code>signature_index</code>. * * @see #toClassSignature(String) * @see #toMethodSignature(String) */ public String getSignature() { return getConstPool().getUtf8Info(ByteArray.readU16bit(get(), 0)); }
/** * Returns the generic signature indicated by <code>signature_index</code>. * * @see #toClassSignature(String) * @see #toMethodSignature(String) * @see #toFieldSignature(String) */ public String getSignature() { return getConstPool().getUtf8Info(ByteArray.readU16bit(get(), 0)); }
/** * Returns the signature indicated by <code>signature_index</code>. * * @see #toClassSignature(String) * @see #toMethodSignature(String) */ public String getSignature() { return getConstPool().getUtf8Info(ByteArray.readU16bit(get(), 0)); }
/** * Returns the generic signature indicated by <code>signature_index</code>. * * @see #toClassSignature(String) * @see #toMethodSignature(String) * @see #toFieldSignature(String) */ public String getSignature() { return getConstPool().getUtf8Info(ByteArray.readU16bit(get(), 0)); }
/** * Returns the generic signature indicated by <code>signature_index</code>. * * @see #toClassSignature(String) * @see #toMethodSignature(String) * @see #toFieldSignature(String) */ public String getSignature() { return getConstPool().getUtf8Info(ByteArray.readU16bit(get(), 0)); }
private void replaceGenericResponseMethods(CtClass clazz) throws NotFoundException, CannotCompileException, BadBytecode { for (CtMethod method : clazz.getMethods()) { if (method.getReturnType().subtypeOf(getGenericResponseClass())) { MethodInfo methodInfo = method.getMethodInfo(); CtMethod replacementMethod = CtNewMethod .abstractMethod( getResponseClass(), method.getName(), method.getParameterTypes(), method.getExceptionTypes(), clazz); for (Object attributeInfo : methodInfo.getAttributes()) { if (attributeInfo instanceof SignatureAttribute) { String sig = transformMethodSignature((SignatureAttribute) attributeInfo); replacementMethod.getMethodInfo().addAttribute( new SignatureAttribute(((SignatureAttribute) attributeInfo).getConstPool(), sig)); } else { replacementMethod.getMethodInfo().addAttribute((AttributeInfo) attributeInfo); } } clazz.removeMethod(method); clazz.addMethod(replacementMethod); } } }