Package booton.translator.annotation

Examples of booton.translator.annotation.PrimitiveMarker.intValue()


        Annotation[] set = annotations[0];
        assert set.length == 1;
        assert set[0] instanceof PrimitiveMarker;

        PrimitiveMarker primitive = (PrimitiveMarker) set[0];
        assert primitive.intValue() == 2;

        set = annotations[1];
        assert set.length == 1;
        assert set[0] instanceof StringMarker;
View Full Code Here


        Annotation[] set = annotations[0];
        assert set.length == 1;
        assert set[0] instanceof PrimitiveMarker;

        PrimitiveMarker primitive = (PrimitiveMarker) set[0];
        assert primitive.intValue() == 2;

        set = annotations[1];
        assert set.length == 1;
        assert set[0] instanceof StringMarker;
View Full Code Here

        set = annotations[1];
        assert set.length == 1;
        assert set[0] instanceof PrimitiveMarker;

        PrimitiveMarker primitive = (PrimitiveMarker) set[0];
        assert primitive.intValue() == 1000;
    }

    /**
     * @version 2013/09/13 16:17:19
     */
 
View Full Code Here

    @Test
    public void annotation() throws Exception {
        Constructor<?> constructor = Annotated.class.getDeclaredConstructors()[0];
        PrimitiveMarker annotation = constructor.getAnnotation(PrimitiveMarker.class);
        assert annotation != null;
        assert annotation.intValue() == 100;
    }

    /**
     * @version 2013/09/04 11:12:53
     */
 
View Full Code Here

    public void getAnnotation() throws Exception {
        PrimitiveMarker annotation = Annotated.class.getAnnotation(PrimitiveMarker.class);
        assert annotation != null;
        assert annotation instanceof Annotation;
        assert annotation instanceof PrimitiveMarker;
        assert annotation.intValue() == 5;
        assert annotation.booleanValue();
        assert annotation.longValue() == 10;
        assert annotation.annotationType() == PrimitiveMarker.class;

        assert annotation == Annotated.class.getAnnotation(PrimitiveMarker.class);
View Full Code Here

        } else {
            a1 = (PrimitiveMarker) annotations[1];
            a2 = (StringMarker) annotations[0];
        }

        assert a1.intValue() == 5;
        assert a2.value().equals("value");
    }

    @Test
    public void inheritable() throws Exception {
View Full Code Here

        Method method = Annotated.class.getMethod("method");
        PrimitiveMarker annotation = method.getAnnotation(PrimitiveMarker.class);
        assert annotation != null;
        assert annotation instanceof Annotation;
        assert annotation instanceof PrimitiveMarker;
        assert annotation.intValue() == 10;
        assert annotation.booleanValue();
        assert annotation.doubleValue() == 3.14;
        assert annotation.annotationType() == PrimitiveMarker.class;

        assert annotation == method.getAnnotation(PrimitiveMarker.class);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.