/** * Add a method to this class. * Note that in bytecode, constructors are named <code><init></code> * and static initializers are named <code><clinit></code>. * * @return the added method */ public BCMethod declareMethod(String name, String returnType, String[] paramTypes) { BCMethod method = new BCMethod(this); _state.getMethodsHolder().add(method); method.initialize(name, _project.getNameCache(). getDescriptor(returnType, paramTypes)); return method; }
/** * Add a method to this class. * Note that in bytecode, constructors are named <code><init></code> * and static initializers are named <code><clinit></code>. * * @return the added method */ public BCMethod declareMethod(String name, String returnType, String[] paramTypes) { BCMethod method = new BCMethod(this); _state.getMethodsHolder().add(method); method.initialize(name, _project.getNameCache(). getDescriptor(returnType, paramTypes)); return method; }
/** * Set the return type of this method. */ public void setReturn(String name) { setDescriptor(getProject().getNameCache().getDescriptor(name, getParamNames())); }
/** * Set the parameter types of this method. * * @see BCMember#setDescriptor */ public void setParams(String[] names) { if (names == null) names = new String[0]; setDescriptor(getProject().getNameCache().getDescriptor(getReturnName(), names)); }
/** * Set the return type of this method. */ public void setReturn(String name) { setDescriptor(getProject().getNameCache().getDescriptor(name, getParamNames())); }
/** * Set the parameter types of this method. * * @see BCMember#setDescriptor */ public void setParams(String[] names) { if (names == null) names = new String[0]; setDescriptor(getProject().getNameCache().getDescriptor(getReturnName(), names)); }
params[i] = cache.getInternalForm(params[i], true); String desc = cache.getDescriptor(returnType, params); if (getOpcode() == Constants.INVOKEINTERFACE) return setMethodIndex(getPool().findInterfaceMethodEntry(dec, name,
params[i] = cache.getInternalForm(params[i], true); String desc = cache.getDescriptor(returnType, params); if (getOpcode() == Constants.INVOKEINTERFACE) return setMethodIndex(getPool().findInterfaceMethodEntry(dec, name,