Assert true or unknown class in JQL exception.

@param expression
the expression
@param method
the method
@param className
the class name
187554
public static void assertTrueOrUnknownClassInJQLException(boolean expression, SQLiteModelMethod method,
			String className) {
		if (!expression) {
			throw (new UnknownClassInJQLException(method, className));
		}
	}
1024894
private static void analyzeClassFile(org.jacoco.previous.core.analysis.Analyzer analyzer, File classFile) {
    try (InputStream inputStream = new FileInputStream(classFile)) {
      analyzer.analyzeClass(inputStream, classFile.getPath());
    } catch (IOException e) {
      // (Godin): in fact JaCoCo includes name into exception
      JaCoCoExtensions.logger().warn("Exception during analysis of file " + classFile.getAbsolutePath(), e);
    }
  }
1144295
public static void failUnknownPropertyInJQLException(SQLiteModelMethod method,
			Class<? extends Annotation> annotationClazz, AnnotationAttributeType attribute, String fieldName) {
		throw (new UnknownPropertyInJQLException(method, annotationClazz, attribute, fieldName));

	}
844260
public static boolean verifyClass(String className){
        try {
            Class<?> cl = Class.forName(className);
            cl.newInstance();
            return true;
        }
        catch (Exception ex) {
          logger.severeException("ApplicationContext: verifyClass(): General Exception occurred: " + ex.getMessage(), ex);
          return false;
        }
    }
794819
public static void asserTrueOrMissedAnnotationOnClassException(boolean expression, TypeElement daoElement,
			String entityName) {
		if (!expression) {
			String msg = String.format("Dao '%s' referes a bean '%s' without @%s or @%s annotation",
					daoElement.getQualifiedName(), TypeUtility.className(entityName), BindType.class.getSimpleName(),
					BindSqlType.class.getSimpleName());
			throw (new MissedAnnotationOnClass(msg));
		}

	}
805587
public static void assertTrue(boolean expression, String message, Object... args) {
        assertTrue(expression, null, message, args);
    }
890415
private Method methodExists(Class<?> clazz, String method, Class<?>[] params) {
		try {
			return clazz.getMethod(method, params);
		} catch (NoSuchMethodException e) {
			return null;
		}
	}
247552
public static void assertNoParameters(final Method method, Class<? extends Annotation> annotation) 
   {
      if (method.getParameterTypes().length != 0)
      {
         throw annotation == null ? MESSAGES.methodHasToHaveNoParameters(method) : MESSAGES.methodHasToHaveNoParameters2(method, annotation);
      }
   }
1202730
public static void generate(TypeSpec.Builder classBuilder, SQLiteModelMethod method) {

		ModifyType updateResultType = detectModifyType(method, method.jql.operationType);

		// if true, field must be associate to ben attributes
		TypeName returnType = method.getReturnClass();

		if (updateResultType == null) {
			throw (new InvalidMethodSignException(method));
		}

		// generate method code
		MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder(method.getName()).addAnnotation(Override.class)
				.addModifiers(Modifier.PUBLIC);
		ParameterSpec parameterSpec;
		for (Pair<String, TypeName> item : method.getParameters()) {
			parameterSpec = ParameterSpec.builder(item.value1, item.value0).build();
			methodBuilder.addParameter(parameterSpec);
		}
		methodBuilder.returns(returnType);

		// generate inner code
		updateResultType.generate(classBuilder, methodBuilder, method, returnType);

		MethodSpec methodSpec = methodBuilder.build();
		classBuilder.addMethod(methodSpec);

		if (method.contentProviderEntryPathEnabled) {
			// delete-select, update-select can be used with content provider
			// insert-select no

			// if (method.jql.containsSelectOperation && updateResultType==) {
			// AssertKripton.failWithInvalidMethodSignException(true, method, "
			// SQL with inner SELECT can not be used in content provider");
			// }

			generateModifierForContentProvider(BaseProcessor.elementUtils, classBuilder, method, updateResultType);

		}

	}
127206
@Check
	public void checkAssumeKeywordUse(SarlAssertExpression expression) {
		if (expression.isIsStatic()) {
			error(MessageFormat.format(
					Messages.SARLValidator_0,
					this.grammarAccess.getIsStaticAssumeKeyword()),
					expression,
					null);
		}
	}
1078604
public static void assertTrue(boolean expression, ExceptionType exceptionType, String message, Object... args) {
        if (!expression) {
            if (exceptionType == null) {
                exceptionType = ExceptionType.ILLEGAL_ARGUMENT;
            }

            throw exceptionType.newInstance(getMessage(message, args,
                                                       "[Assertion failed] - the expression must be true"));
        }
    }
386796
public static void assertTrueOrInvalidMethodSignException(boolean expression, SQLiteModelMethod method,
			String messageFormat, Object... args) {
		if (!expression)
			throw (new InvalidMethodSignException(method, String.format(messageFormat, args)));
	}
435637
protected void assertNoNameParameter(Method executeMethod, String urlPattern, String elementName) {
        if (!elementName.isEmpty()) {
            throwUrlPatternNamedParameterUnsupportedException(executeMethod, urlPattern, elementName);
        }
    }
1309089
public static void assertNoPrimitiveParameters(final Method method, Class<? extends Annotation> annotation)
   {
      for (Class<?> type : method.getParameterTypes())
      {
         if (type.isPrimitive())
         {
            throw annotation == null ? MESSAGES.methodCannotDeclarePrimitiveParameters(method) : MESSAGES.methodCannotDeclarePrimitiveParameters2(method, annotation);
         }
      }
   }
736052
private boolean isHandlerMethod(final Method method) {
        boolean isHandler = false;

        if (hasStartSagaAnnotation(method) || hasHandlerAnnotation(method)) {
            if (method.getReturnType().equals(Void.TYPE)) {
                Class<?>[] parameterTypes = method.getParameterTypes();
                if (parameterTypes.length == 1) {
                    isHandler = true;
                } else {
                    LOG.warn("Method {}.{} marked for saga does not have the expected single parameter.", method.getDeclaringClass(), method.getName());
                }
            } else {
                LOG.warn("Method {}.{} marked for saga event handling but does return a value.", method.getDeclaringClass(), method.getName());
            }
        }

        return isHandler;
    }
452813
static JbcSrcJavaValue of(Expression expr, Method method, JbcSrcValueErrorReporter reporter) {
    checkNotNull(method);
    if (expr instanceof SoyExpression) {
      return new JbcSrcJavaValue(
          expr,
          method,
          /* allowedType= */ ((SoyExpression) expr).soyType(),
          /* constantNull= */ false,
          /* error= */ false,
          reporter);
    }
    return new JbcSrcJavaValue(
        expr,
        method,
        /* allowedType= */ null,
        /* constantNull= */ false,
        /* error= */ false,
        reporter);
  }
621008
private static boolean implementsMethod(ClassNode classNode, String methodName, Class[] argTypes) {
        List methods = classNode.getMethods();
        if (argTypes == null || argTypes.length ==0) {
            for (Iterator i = methods.iterator(); i.hasNext();) {
                MethodNode mn = (MethodNode) i.next();
                boolean methodMatch = mn.getName().equals(methodName);
                if(methodMatch)return true;
                // TODO Implement further parameter analysis
            }
        }
        return false;
    }