Package java.lang.annotation

Examples of java.lang.annotation.IncompleteAnnotationException


    @SuppressWarnings("nls")
    public void test_constructorLjava_lang_Class_Ljava_lang_String()
            throws Exception {
        Class clazz = String.class;
        String elementName = "some element";
        IncompleteAnnotationException e = new IncompleteAnnotationException(
                clazz, elementName);
        assertNotNull("can not instanciate IncompleteAnnotationException", e);
        assertSame("wrong annotation type", clazz, e.annotationType());
        assertSame("wrong element name", elementName, e.elementName());
    }
View Full Code Here


            if (element == null || !method.equals(element.definingMethod)) {
                throw new IllegalArgumentException(method.toString());
            } else {
                Object value = element.validateValue();
                if (value == null) {
                    throw new IncompleteAnnotationException(klazz, name);
                }
                return value;
            }
    } else if (params.length == 1 && params[0] == Object.class && "equals".equals(name)){
        return Boolean.valueOf(equals(args[0]));
View Full Code Here

     * Class under test for void IncompleteAnnotationException(String)
     * Regression for HARMONY-2477
     */
    public void testNullType() {
        try {
            new IncompleteAnnotationException(null, "str");
            fail("NullPointerException must be thrown");
        } catch (NullPointerException e) {
            // Expected
        }
    }
View Full Code Here

    @SuppressWarnings("nls")
    public void test_constructorLjava_lang_Class_Ljava_lang_String()
            throws Exception {
        Class clazz = String.class;
        String elementName = "some element";
        IncompleteAnnotationException e = new IncompleteAnnotationException(
                clazz, elementName);
        assertNotNull("can not instantiate IncompleteAnnotationException", e);
        assertSame("wrong annotation type", clazz, e.annotationType());
        assertSame("wrong element name", elementName, e.elementName());
    }
View Full Code Here

            if (element == null || !method.equals(element.definingMethod)) {
                throw new IllegalArgumentException(method.toString());
            } else {
                Object value = element.validateValue();
                if (value == null) {
                    throw new IncompleteAnnotationException(klazz, name);
                }
                return value;
            }
    } else if (params.length == 1 && params[0] == Object.class && "equals".equals(name)){
        return Boolean.valueOf(equals(args[0]));
View Full Code Here

TOP

Related Classes of java.lang.annotation.IncompleteAnnotationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.