Package de.codecamp.messages.codegen
Class DeclaredMessageKey
- java.lang.Object
-
- de.codecamp.messages.codegen.DeclaredMessageKey
-
- All Implemented Interfaces:
MessageKey
public class DeclaredMessageKey extends Object implements MessageKey
Basic implementation ofMessageKeywith a few extensions. Used for the message key constants.
-
-
Field Summary
-
Fields inherited from interface de.codecamp.messages.MessageKey
TYPE_KEY_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description DeclaredMessageKey(Class<?> sourceType, String code, Class<?>[] argTypes, String[] argNames)Constructs a newDeclaredMessageKey.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)String[]getArgNames()Class<?>[]getArgTypes()StringgetCode()Returns the actual code of the message key.Class<?>getSourceType()Returns the top-level type the message key was declared in.booleanhasArgs()inthashCode()
-
-
-
Constructor Detail
-
DeclaredMessageKey
public DeclaredMessageKey(Class<?> sourceType, String code, Class<?>[] argTypes, String[] argNames)
Constructs a newDeclaredMessageKey.- Parameters:
sourceType- the type the message key was declared incode- the message keyargTypes- the message argument typesargNames- the message argument names
-
-
Method Detail
-
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:MessageKeyReturns the actual code of the message key.- Specified by:
getCodein interfaceMessageKey- Returns:
- the code
-
hasArgs
public boolean hasArgs()
-
getArgTypes
public Class<?>[] getArgTypes()
-
getArgNames
public String[] getArgNames()
-
-