Module com.speedment.common.codegen
Enum DefaultAnnotationUsage
- java.lang.Object
-
- java.lang.Enum<DefaultAnnotationUsage>
-
- com.speedment.common.codegen.constant.DefaultAnnotationUsage
-
- All Implemented Interfaces:
AnnotationUsage,HasCopy<AnnotationUsage>,HasType<AnnotationUsage>,HasValue<AnnotationUsage>,Serializable,Comparable<DefaultAnnotationUsage>
public enum DefaultAnnotationUsage extends Enum<DefaultAnnotationUsage> implements AnnotationUsage
An enumeration with default constants for theAnnotationUsageinterface. If any of the setter methods are called, the model will be cloned into a non-enum value before the value is changed in the clone. This makes it possible to safely set values in the constants without changing their actual state.- Author:
- Emil Forslund
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEPRECATEDDOCUMENTEDINHERITEDNATIVEOVERRIDEREPEATABLERETENTIONSUPPRESS_WARNINGS_UNCHECKEDTARGET
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationUsagecopy()Create a deep copy of this model if it is mutable.TypegetType()Returns the type of this model.Optional<Value<?>>getValue()Returns the value of this model.List<Map.Entry<String,Value<?>>>getValues()Returns a list of all the key-value pairs in this model.AnnotationUsageput(String key, Value<?> val)Use the specified key-value pair when referencing the annotation.AnnotationUsageset(Value<?> val)Sets the value of this model.AnnotationUsageset(Type type)Sets the type of this model.static DefaultAnnotationUsagevalueOf(String name)Returns the enum constant of this type with the specified name.static DefaultAnnotationUsage[]values()Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.speedment.common.codegen.model.AnnotationUsage
put, put
-
-
-
-
Enum Constant Detail
-
OVERRIDE
public static final DefaultAnnotationUsage OVERRIDE
-
DOCUMENTED
public static final DefaultAnnotationUsage DOCUMENTED
-
INHERITED
public static final DefaultAnnotationUsage INHERITED
-
NATIVE
public static final DefaultAnnotationUsage NATIVE
-
REPEATABLE
public static final DefaultAnnotationUsage REPEATABLE
-
RETENTION
public static final DefaultAnnotationUsage RETENTION
-
TARGET
public static final DefaultAnnotationUsage TARGET
-
DEPRECATED
public static final DefaultAnnotationUsage DEPRECATED
-
SUPPRESS_WARNINGS_UNCHECKED
public static final DefaultAnnotationUsage SUPPRESS_WARNINGS_UNCHECKED
-
-
Method Detail
-
values
public static DefaultAnnotationUsage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DefaultAnnotationUsage c : DefaultAnnotationUsage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DefaultAnnotationUsage valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
set
public AnnotationUsage set(Type type)
Sets the type of this model.Since this is a constant, the model will first be copied and the operation will then be performed on the copy.
- Specified by:
setin interfaceHasType<AnnotationUsage>- Parameters:
type- the new type- Returns:
- a reference to this
-
set
public AnnotationUsage set(Value<?> val)
Sets the value of this model.Since this is a constant, the model will first be copied and the operation will then be performed on the copy.
- Specified by:
setin interfaceHasValue<AnnotationUsage>- Parameters:
val- the new value- Returns:
- a reference to this
-
put
public AnnotationUsage put(String key, Value<?> val)
Use the specified key-value pair when referencing the annotation. If you only want to show a single value without any key, consider using theHasValue.set(Value)method.Since this is a constant, the model will first be copied and the operation will then be performed on the copy.
- Specified by:
putin interfaceAnnotationUsage- Parameters:
key- the keyval- the value- Returns:
- a reference to this model
-
getType
public Type getType()
Description copied from interface:HasTypeReturns the type of this model.- Specified by:
getTypein interfaceHasType<AnnotationUsage>- Returns:
- the type
-
getValue
public Optional<Value<?>> getValue()
Description copied from interface:HasValueReturns the value of this model.- Specified by:
getValuein interfaceHasValue<AnnotationUsage>- Returns:
- the value
-
getValues
public List<Map.Entry<String,Value<?>>> getValues()
Description copied from interface:AnnotationUsageReturns a list of all the key-value pairs in this model.- Specified by:
getValuesin interfaceAnnotationUsage- Returns:
- all key-value pairs
-
copy
public AnnotationUsage copy()
Description copied from interface:HasCopyCreate a deep copy of this model if it is mutable. If this class is not mutable, then this method may return itself. If the model implementsHasParent, then the parent property will not be copied. Instead it will be set tonull.- Specified by:
copyin interfaceHasCopy<AnnotationUsage>- Returns:
- the copy
-
-