public boolean isMethodType(EnterpriseBean bean, JavaClass clazz, Method method, List[] methodsExtendedLists) { if(method == null) { return false; } if(method.isConstructor()) { return true; } return false; }
public boolean isMethodType(EnterpriseBean bean, JavaClass clazz, Method method, List[] methodsExtendedLists) { if(method == null) { return false; } if(method.isConstructor()) { // This class must define a public constructor which takes no parameters. Read section 7.10.1 of the EJB 2.0 specification. if(ValidationRuleUtility.isPublic(method)) { if(method.getParameters().size() == 0) { return true; } } } return false; }
/** * Checks to see if @ejbMethod is one of the required methods. */ protected void primValidateExistence(IEJBValidationContext vc, EnterpriseBean bean, JavaClass clazz, Method ejbMethod) throws InvalidInputException { // Can't invoke an abstract method //super.validateExistence(ejbMethod); if (ejbMethod.isConstructor()) { // These booleans are used in the validateMethodExists() checks. hasAConstructor = true; if (ValidationRuleUtility.isPublic(ejbMethod) && (ejbMethod.listParametersWithoutReturn().length == 0)) { hasDefaultConstructor = true; } } }
/** * Checks to see if @ejbMethod is one of the required methods. */ protected void primValidateExistence(IEJBValidationContext vc, EnterpriseBean bean, JavaClass clazz, Method ejbMethod) throws InvalidInputException { // Can't invoke an abstract method //super.validateExistence(ejbMethod); if (IMethodAndFieldConstants.METHODNAME_EJBCREATE.equals(ejbMethod.getName())) incrementCreateMethodCount(vc, bean, clazz, ejbMethod); else if (ejbMethod.isConstructor()) validateConstructor(vc, bean, clazz, ejbMethod); }
private void writeSEIMethods(Writer w) throws IOException, CoreException { newLine(w); //WebServiceElement wse = WebServiceElement.getWebServiceElement(model_); if (clientProject_ == null) return;//wse.getProxyProject(); StringTokenizer st = new StringTokenizer(seis_.toString(), ";"); while (st.hasMoreTokens()) { String sei = st.nextToken(); JavaClass javaClass = JavaMOFUtils.getJavaClass(getPackageName(sei), getClassName(sei), clientProject_); if (javaClass != null) { List methods = javaClass.getMethods(); for (Iterator it = methods.iterator(); it.hasNext();) { Method method = (Method)it.next(); if (!method.isConstructor() && !method.isNative() && method.getJavaVisibility().getValue() == JavaVisibilityKind.PUBLIC) writeSEIMethods(w, javaClass, method); } } } }
if(method.isConstructor()) continue;
else if (!hasValidConstructor && ejbMethod.isConstructor()) { hasAConstructor = true; if (ValidationRuleUtility.isPublic(ejbMethod) && (ejbMethod.listParametersWithoutReturn().length == 0)) {
/** * Check that the ejbCreate methods and business methods follow the EJB 1.1 spec. * Section: 6.8, 6.10.2, 6.10.3 and 6.10.4 */ public void primValidate(IEJBValidationContext vc, EnterpriseBean bean, JavaClass clazz, Method ejbMethod) throws InvalidInputException { // Can't invoke an abstract method // super.primValidate(ejbMethod); vc.terminateIfCancelled(); String name = ejbMethod.getName(); if (name.equals(IMethodAndFieldConstants.METHODNAME_EJBCREATE)) { validateEjbCreateMethod(vc, bean, clazz, ejbMethod); } else if (name.equals(IMethodAndFieldConstants.METHODNAME_FINALIZE)) { validateFinalizeMethod(vc, bean, clazz, ejbMethod); } else if (ejbMethod.isConstructor()) { validateConstructor(vc, bean, clazz, ejbMethod); } else if (isBusinessMethod(vc, bean, clazz, ejbMethod)) { validateBusinessMethod(vc, bean, clazz, ejbMethod); } else if (!isFrameworkMethod(name)) { validateHelperMethod(vc, bean, clazz, ejbMethod); } vc.terminateIfCancelled(); }
if (method.isConstructor()) { return false;