Class AnnotationDefinition

java.lang.Object
com.sap.cloud.sdk.datamodel.odata.generator.annotation.AnnotationDefinition

public class AnnotationDefinition extends Object
Data structure to represent a Java annotation and its parameters. When implementing the AnnotationStrategy interface, you have to construct instances of these classes. The VDM generator uses this to apply annotations to the generated Java code.
  • Constructor Details

    • AnnotationDefinition

      public AnnotationDefinition(@Nonnull Class<? extends Annotation> annotationClass)
      Create a plain annotation definition with no annotation parameters.
      Parameters:
      annotationClass - Reference to the annotation class itself.
    • AnnotationDefinition

      public AnnotationDefinition(@Nonnull Class<? extends Annotation> annotationClass, @Nonnull AnnotationParameter... parameters)
      Create an annotation definition with the provided annotation parameters.
      Parameters:
      annotationClass - Reference to the annotation class itself.
      parameters - A set of parameters that the VDM generator should apply to this annotation.
  • Method Details

    • addAnnotationParameter

      public void addAnnotationParameter(@Nonnull AnnotationParameter parameter)
      Adds the provided annotation parameter to the set of parameters in this instance.
      Parameters:
      parameter - The additional parameter that the VDM generator should apply to this annotation.
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(@Nullable Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getAnnotationClass

      public Class<? extends Annotation> getAnnotationClass()
    • getAnnotationParameters

      public List<AnnotationParameter> getAnnotationParameters()