/**Removes the method descriptor identified by it's name. <p> * <p> * Please note that removal of a sequential method can have unpredictable results during a call. <br> * @param methodName * @see #addMethodDescriptor(JILocalMethodDescriptor) */ public void removeMethodDescriptor(String methodName) { JILocalMethodDescriptor methodDescriptor = (JILocalMethodDescriptor)nameVsMethodInfo.remove(methodName); if (methodDescriptor != null) { nameVsMethodInfo.remove(new Integer(methodDescriptor.getMethodNum())); } }
/**Removes the method descriptor identified by it's name. <p> * <p> * Please note that removal of a sequential method can have unpredictable results during a call. <br> * @param methodName * @see #addMethodDescriptor(JILocalMethodDescriptor) */ public void removeMethodDescriptor(String methodName) { JILocalMethodDescriptor methodDescriptor = (JILocalMethodDescriptor)nameVsMethodInfo.remove(methodName); if (methodDescriptor != null) { nameVsMethodInfo.remove(new Integer(methodDescriptor.getMethodNum())); } }
/** * Removes the method descriptor identified by it's name. * <p> * <p> * Please note that removal of a sequential method can have unpredictable * results during a call. <br> * * @param methodName * @see #addMethodDescriptor(JILocalMethodDescriptor) */ public void removeMethodDescriptor ( final String methodName ) { final JILocalMethodDescriptor methodDescriptor = (JILocalMethodDescriptor)this.nameVsMethodInfo.remove ( methodName ); if ( methodDescriptor != null ) { this.nameVsMethodInfo.remove ( new Integer ( methodDescriptor.getMethodNum () ) ); } }
/**Adds a Method Descriptor. Methods <b>must</b> be added in the same order as they appear in the IDL. * * <p> Please note that overloaded methods are not allowed. * @param methodDescriptor * @throws IllegalArgumentException if a method by the same name already exists. */ public void addMethodDescriptor(JILocalMethodDescriptor methodDescriptor) { if (nameVsMethodInfo.containsKey(methodDescriptor.getMethodName())) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_CALLBACK_OVERLOADS_NOTALLOWED)); } methodDescriptor.setMethodNum(nextNum); nextNum++; opnumVsMethodInfo.put(new Integer(methodDescriptor.getMethodNum()),methodDescriptor); if (dispInterface) { if (methodDescriptor.getMethodDispID() == -1) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_METHODDESC_DISPID_MISSING)); } dispIdVsMethodInfo.put(new Integer(methodDescriptor.getMethodDispID()),methodDescriptor); } nameVsMethodInfo.put(methodDescriptor.getMethodName(),methodDescriptor); }
/**Adds a Method Descriptor. Methods <b>must</b> be added in the same order as they appear in the IDL. * * <p> Please note that overloaded methods are not allowed. * @param methodDescriptor * @throws IllegalArgumentException if a method by the same name already exists. */ public void addMethodDescriptor(JILocalMethodDescriptor methodDescriptor) { if (nameVsMethodInfo.containsKey(methodDescriptor.getMethodName())) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_CALLBACK_OVERLOADS_NOTALLOWED)); } methodDescriptor.setMethodNum(nextNum); nextNum++; opnumVsMethodInfo.put(new Integer(methodDescriptor.getMethodNum()),methodDescriptor); if (dispInterface) { if (methodDescriptor.getMethodDispID() == -1) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_METHODDESC_DISPID_MISSING)); } dispIdVsMethodInfo.put(new Integer(methodDescriptor.getMethodDispID()),methodDescriptor); } nameVsMethodInfo.put(methodDescriptor.getMethodName(),methodDescriptor); }
/** * Adds a Method Descriptor. Methods <b>must</b> be added in the same order * as they appear in the IDL. * <p> * Please note that overloaded methods are not allowed. * * @param methodDescriptor * @throws IllegalArgumentException * if a method by the same name already exists. */ public void addMethodDescriptor ( final JILocalMethodDescriptor methodDescriptor ) { if ( this.nameVsMethodInfo.containsKey ( methodDescriptor.getMethodName () ) ) { throw new IllegalArgumentException ( JISystem.getLocalizedMessage ( JIErrorCodes.JI_CALLBACK_OVERLOADS_NOTALLOWED ) ); } methodDescriptor.setMethodNum ( this.nextNum ); this.nextNum++; this.opnumVsMethodInfo.put ( new Integer ( methodDescriptor.getMethodNum () ), methodDescriptor ); if ( this.dispInterface ) { if ( methodDescriptor.getMethodDispID () == -1 ) { throw new IllegalArgumentException ( JISystem.getLocalizedMessage ( JIErrorCodes.JI_METHODDESC_DISPID_MISSING ) ); } this.dispIdVsMethodInfo.put ( new Integer ( methodDescriptor.getMethodDispID () ), methodDescriptor ); } this.nameVsMethodInfo.put ( methodDescriptor.getMethodName (), methodDescriptor ); }
dispIds[0] = new Integer ( info.getMethodNum () );
dispIds[0] = new Integer(info.getMethodNum());
dispIds[0] = new Integer(info.getMethodNum());