Code example for Annotation

Methods: annotationType

0
            } 
        } 
    } 
 
    private boolean isInstantAnnotation(final Annotation annotation) {
        return annotation.annotationType().equals(InstantText.class);
    } 
 
    private void assertMethodIsPublic(final Method method) {
        if (!Modifier.isPublic(method.getModifiers())) {
            throw new IllegalStateException(String.format("%s.%s() should be public",
                            mDataType.getSimpleName(), method.getName()));
        } 
    } 
 
    private void assertNoParamsOrSingleContextParam(final Method method) {
        Class<?>[] parameters = method.getParameterTypes();
        final int nParameters = parameters.length;
        if (nParameters > 0) {
            String errorMessage = String.format("%s.%s() can have a single Context " +
                    "parameter or should have no parameters.",