Class AnnotationParameter

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

public class AnnotationParameter extends Object
Data structure to represent a parameter of a Java annotation. When implementing the AnnotationStrategy interface, you add instances of this class to AnnotationDefinition instances. The VDM generator uses this to add parameters to annotations while generating Java code. NOTE: Only primitive types, String, Enum , and Class are supported.
  • Constructor Details

    • AnnotationParameter

      public AnnotationParameter(@Nonnull String name, @Nonnull Class<?> value)
      Creates an annotation parameter with a Class value.
      Parameters:
      name - Name of the annotation parameter. For cases where you want to set the single default parameter, use "value".
      value - The value to use in the parameter of the annotation itself.
    • AnnotationParameter

      public AnnotationParameter(@Nonnull String name, @Nonnull Enum<?> value)
      Creates an annotation parameter with an Enum value.
      Parameters:
      name - Name of the annotation parameter. For cases where you want to set the single default parameter, use "value".
      value - The value to use in the parameter of the annotation itself.
    • AnnotationParameter

      public AnnotationParameter(@Nonnull String name, @Nonnull String value)
      Creates an annotation parameter with a String value.
      Parameters:
      name - Name of the annotation parameter. For cases where you want to set the single default parameter, use "value".
      value - The value to use in the parameter of the annotation itself.
    • AnnotationParameter

      public AnnotationParameter(@Nonnull String name, char value)
      Creates an annotation parameter with a char value.
      Parameters:
      name - Name of the annotation parameter. For cases where you want to set the single default parameter, use "value".
      value - The value to use in the parameter of the annotation itself.
    • AnnotationParameter

      public AnnotationParameter(@Nonnull String name, byte value)
      Creates an annotation parameter with a byte value.
      Parameters:
      name - Name of the annotation parameter. For cases where you want to set the single default parameter, use "value".
      value - The value to use in the parameter of the annotation itself.
    • AnnotationParameter

      public AnnotationParameter(@Nonnull String name, boolean value)
      Creates an annotation parameter with a boolean value.
      Parameters:
      name - Name of the annotation parameter. For cases where you want to set the single default parameter, use "value".
      value - The value to use in the parameter of the annotation itself.
    • AnnotationParameter

      public AnnotationParameter(@Nonnull String name, double value)
      Creates an annotation parameter with a double value.
      Parameters:
      name - Name of the annotation parameter. For cases where you want to set the single default parameter, use "value".
      value - The value to use in the parameter of the annotation itself.
    • AnnotationParameter

      public AnnotationParameter(@Nonnull String name, float value)
      Creates an annotation parameter with a float value.
      Parameters:
      name - Name of the annotation parameter. For cases where you want to set the single default parameter, use "value".
      value - The value to use in the parameter of the annotation itself.
    • AnnotationParameter

      public AnnotationParameter(@Nonnull String name, long value)
      Creates an annotation parameter with a long value.
      Parameters:
      name - Name of the annotation parameter. For cases where you want to set the single default parameter, use "value".
      value - The value to use in the parameter of the annotation itself.
    • AnnotationParameter

      public AnnotationParameter(@Nonnull String name, int value)
      Creates an annotation parameter with an int value.
      Parameters:
      name - Name of the annotation parameter. For cases where you want to set the single default parameter, use "value".
      value - The value to use in the parameter of the annotation itself.
    • AnnotationParameter

      public AnnotationParameter(@Nonnull String name, short value)
      Creates an annotation parameter with a short value.
      Parameters:
      name - Name of the annotation parameter. For cases where you want to set the single default parameter, use "value".
      value - The value to use in the parameter of the annotation itself.
  • Method Details

    • getName

      public String getName()
    • getValue

      public Object getValue()