Java Code Examples for javax.lang.model.util.SimpleAnnotationValueVisitor7

Following code examples demonstrate how to use javax.lang.model.util.SimpleAnnotationValueVisitor7from java. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use javax.lang.model.util.SimpleAnnotationValueVisitor7and various code implementation of this class.

    @Test
    public default void verifyGenericType()
    throws Exception {
        final Class<SUT> sut = createNewSUT();
        assertTrue("This j8unit test interface is used with a generic type that is illegaly not assignable to SimpleAnnotationValueVisitor7.class!",
                   SimpleAnnotationValueVisitor7.class.isAssignableFrom(sut));
    } 


Advertisement
Javadoc
A simple visitor for annotation values with default behavior appropriate for the SourceVersion#RELEA

SE_7 RELEASE_7 source version. Visit methods call #defaultAction defaultAction passing their arguments to defaultAction's corresponding parameters.

Methods in this class may be overridden subject to their general contract. Note that annotating methods in concrete subclasses with java.lang.Override @Override will help ensure that methods are overridden as intended.

WARNING: The AnnotationValueVisitor interface implemented by this class may have methods added to it in the future to accommodate new, currently unknown, language structures added to future versions of the Java™ programming language. Therefore, methods whose names begin with "visit" may be added to this class in the future; to avoid incompatibilities, classes which extend this class should not declare any instance methods with names beginning with "visit".

When such a new visit method is added, the default implementation in this class will be to call the #visitUnknown visitUnknown method. A new simple annotation value visitor class will also be introduced to correspond to the new language level; this visitor will have different default behavior for the visit method in question. When the new visitor is introduced, all or portions of this visitor may be deprecated. @param the return type of this visitor's methods @param the type of the additional parameter to this visitor's methods. @see SimpleAnnotationValueVisitor6 @see SimpleAnnotationValueVisitor8 @see SimpleAnnotationValueVisitor9 @since 1.7

Read More
Advertisement