private void analyzeConstraint(JavaMethod javaMethod, Method method) { // Create the constraint: Constraint constraint = new Constraint(); analyzeName(javaMethod, constraint); analyzeAnnotations(javaMethod, constraint); analyzeDocumentation(javaMethod, constraint); // Get the direction: if (isAnnotatedWith(javaMethod, ModelAnnotations.IN)) { constraint.setIn(true); } if (isAnnotatedWith(javaMethod, ModelAnnotations.OUT)) { constraint.setOut(true); } // Get the source: String source = javaMethod.getSourceCode(); constraint.setSource(source); // Remember to analyze the constraint source once the types and services have been completely defined: undefinedConstraints.add(constraint); // Add the constraint to the method: constraint.setDeclaringMethod(method); method.addConstraint(constraint); }