Class DeclaredMessageKey

java.lang.Object
de.codecamp.messages.codegen.DeclaredMessageKey
All Implemented Interfaces:
MessageKey

public class DeclaredMessageKey extends Object implements MessageKey
Basic implementation of MessageKey with a few extensions. Used for the message key constants.
  • Constructor Details

    • DeclaredMessageKey

      public DeclaredMessageKey(Class<?> sourceType, String code, Class<?>[] argTypes, String[] argNames)
      Constructs a new DeclaredMessageKey.
      Parameters:
      sourceType - the type the message key was declared in
      code - the message key
      argTypes - the message argument types
      argNames - the message argument names
  • Method Details

    • getSourceType

      public Class<?> getSourceType()
      Returns the top-level type the message key was declared in.
      Returns:
      the top-level type the message key was declared in
    • getCode

      public String getCode()
      Description copied from interface: MessageKey
      Returns the actual code of the message key.
      Specified by:
      getCode in interface MessageKey
      Returns:
      the code
    • hasArgs

      public boolean hasArgs()
    • getArgTypes

      public Class<?>[] getArgTypes()
    • getArgNames

      public String[] getArgNames()
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object