Module com.speedment.common.codegen
Enum DefaultJavadocTag
- java.lang.Object
-
- java.lang.Enum<DefaultJavadocTag>
-
- com.speedment.common.codegen.constant.DefaultJavadocTag
-
- All Implemented Interfaces:
JavadocTag,HasCall<JavadocTag>,HasCopy<JavadocTag>,HasImports<JavadocTag>,HasName<JavadocTag>,Serializable,Comparable<DefaultJavadocTag>
public enum DefaultJavadocTag extends Enum<DefaultJavadocTag> implements JavadocTag
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JavadocTagcall(Consumer<JavadocTag> procedure)Calls the specifiedConsumerwith this object as the parameter.JavadocTagcopy()Create a deep copy of this model if it is mutable.List<Import>getImports()Returns a list of all imports in this model.StringgetName()Returns the name of this model.Optional<String>getText()Returns the text of this javadoc tag.Optional<String>getValue()Returns the value of this javadoc tag.JavadocTagsetName(String name)Sets the name of this model.JavadocTagsetText(String text)Sets the text of this javadoc tag.JavadocTagsetValue(String value)Sets the value of this javadoc tag.static DefaultJavadocTagvalueOf(String name)Returns the enum constant of this type with the specified name.static DefaultJavadocTag[]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.trait.HasImports
add, imports, imports, imports
-
-
-
-
Enum Constant Detail
-
PARAM
public static final DefaultJavadocTag PARAM
-
AUTHOR
public static final DefaultJavadocTag AUTHOR
-
DEPRECATED
public static final DefaultJavadocTag DEPRECATED
-
RETURN
public static final DefaultJavadocTag RETURN
-
SEE
public static final DefaultJavadocTag SEE
-
THROWS
public static final DefaultJavadocTag THROWS
-
SINCE
public static final DefaultJavadocTag SINCE
-
VERSION
public static final DefaultJavadocTag VERSION
-
-
Method Detail
-
values
public static DefaultJavadocTag[] 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 (DefaultJavadocTag c : DefaultJavadocTag.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DefaultJavadocTag 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
-
setName
public JavadocTag setName(String name)
Sets the name of this model.This must not be
null!Since this is a constant, the model will first be copied and the operation will then be performed on the copy.
- Specified by:
setNamein interfaceHasName<JavadocTag>- Parameters:
name- the new name (notnull!)- Returns:
- a reference to this
-
setValue
public JavadocTag setValue(String value)
Sets the value of this javadoc tag. In the following examples, the value is the "foo" part:@param foo bar @return fooSince this is a constant, the model will first be copied and the operation will then be performed on the copy.
- Specified by:
setValuein interfaceJavadocTag- Parameters:
value- the new value- Returns:
- a reference to this model
-
setText
public JavadocTag setText(String text)
Sets the text of this javadoc tag. In the following examples, the text is the "bar" part:@param foo bar @return fooSince this is a constant, the model will first be copied and the operation will then be performed on the copy.
- Specified by:
setTextin interfaceJavadocTag- Parameters:
text- the new text- Returns:
- a reference to this model
-
call
public JavadocTag call(Consumer<JavadocTag> procedure)
Calls the specifiedConsumerwith this object as the parameter. This method exists so that methods can operate on an object without breaking the flow.Since this is a constant, the model will first be copied and the operation will then be performed on the copy.
- Specified by:
callin interfaceHasCall<JavadocTag>- Parameters:
procedure- the procedure to call- Returns:
- a reference to this
-
getName
public String getName()
Description copied from interface:HasNameReturns the name of this model.- Specified by:
getNamein interfaceHasName<JavadocTag>- Returns:
- the name
-
getValue
public Optional<String> getValue()
Description copied from interface:JavadocTagReturns the value of this javadoc tag. In the following examples, the value is the "foo" part:@param foo bar @return foo- Specified by:
getValuein interfaceJavadocTag- Returns:
- the value part of the tag or
emptyif none exists
-
getText
public Optional<String> getText()
Description copied from interface:JavadocTagReturns the text of this javadoc tag. In the following examples, the text is the "bar" part:@param foo bar @return foo- Specified by:
getTextin interfaceJavadocTag- Returns:
- the text part of the tag or
emptyif none exists
-
getImports
public List<Import> getImports()
Description copied from interface:HasImportsReturns a list of all imports in this model.The list returned must be mutable for changes!
- Specified by:
getImportsin interfaceHasImports<JavadocTag>- Returns:
- the imports
-
copy
public JavadocTag 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<JavadocTag>- Returns:
- the copy
-
-