Interface AnnotationRenderStrategy

All Superinterfaces:
Serializable

public interface AnnotationRenderStrategy extends Serializable
An AnnotationRenderStrategy decides if an annotation shall be rendered on server side or on client side.

The renderers on client and server side will call the accept(Annotation, Document) -method to check if they shall render the annotation.

This implies that the render strategy 'knows' if it resides on client or server side. This can be achieved with the GWT-Helper class (see GWT.isClient().

The available AnnotationRenderStrategy instances can be accessed via the enum PredefinedAnnotationRenderStrategy, which is the entry point for using these strategies.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(Annotation annotation, Document document)
    Checks whether this strategy accepts the given annotation.
  • Method Details

    • accept

      boolean accept(Annotation annotation, Document document)
      Checks whether this strategy accepts the given annotation. A strategy which always renders on client side might, for example, simply return
       GWT.isClient()
       
      Parameters:
      annotation - the annotation in question to be rendered
      document - the corresponding document
      Returns:
      true: the annotation is accepted for rendering; false otherwise