Interface UnitsRelations

  • All Known Implementing Classes:
    UnitsRelationsDefault

    public interface UnitsRelations
    Interface that is used to specify the relation between units. A class that implements this interface is the argument to the UnitsRelations annotation.
    • Method Detail

      • init

        UnitsRelations init​(javax.annotation.processing.ProcessingEnvironment env)
        Initialize the object. Needs to be called before any other method.
        Parameters:
        env - the ProcessingEnvironment to use
        Returns:
        a reference to "this"
      • multiplication

        @Nullable javax.lang.model.element.AnnotationMirror multiplication​(AnnotatedTypeMirror lht,
                                                                           AnnotatedTypeMirror rht)
        Called for the multiplication of type lht and rht.
        Parameters:
        lht - left hand side in multiplication
        rht - right hand side in multiplication
        Returns:
        the annotation to use for the result of the multiplication or null if no special relation is known
      • division

        @Nullable javax.lang.model.element.AnnotationMirror division​(AnnotatedTypeMirror lht,
                                                                     AnnotatedTypeMirror rht)
        Called for the division of type lht and rht.
        Parameters:
        lht - left hand side in division
        rht - right hand side in division
        Returns:
        the annotation to use for the result of the division or null if no special relation is known