public class JavadocBuilder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JavadocBuilder.DocElementFactory
Creates
DocElement . |
static interface |
JavadocBuilder.Placeholder
A document placeholder.
|
Constructor and Description |
---|
JavadocBuilder(ModelFactory factory)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
JavadocBuilder |
block(String tag)
Starts a new block in this builder.
|
JavadocBuilder |
code(String pattern,
Object... arguments)
Appends a
@code inline block into this builder. |
JavadocBuilder |
copy()
Returns a copy of this builder.
|
JavadocBuilder |
exception(Type type)
Starts a
@throws tag block for the target type in this builder. |
JavadocBuilder |
inline(DocElement element)
Appends an inline element into this builder.
|
JavadocBuilder |
inline(List<? extends DocElement> elems)
Appends inline elements into this builder.
|
JavadocBuilder |
inline(String pattern,
JavadocBuilder.Placeholder... placeholders)
Appends inline elements into this builder.
|
JavadocBuilder |
link(DocElement element)
Appends a
@link inline block for the target element into this builder. |
JavadocBuilder |
linkField(SimpleName name)
Appends a
@link inline block for the target field into this builder. |
JavadocBuilder |
linkField(String name)
Appends a
@link inline block for the target field into this builder. |
JavadocBuilder |
linkField(Type type,
SimpleName name)
Appends a
@link inline block for the target field into this builder. |
JavadocBuilder |
linkField(Type type,
String name)
Appends a
@link inline block for the target field into this builder. |
JavadocBuilder |
linkMethod(SimpleName name,
List<? extends Type> parameterTypes)
Appends a
@link inline block for the target method into this builder. |
JavadocBuilder |
linkMethod(SimpleName name,
Type... parameterTypes)
Appends a
@link inline block for the target method into this builder. |
JavadocBuilder |
linkMethod(String name,
List<? extends Type> parameterTypes)
Appends a
@link inline block for the target method into this builder. |
JavadocBuilder |
linkMethod(String name,
Type... parameterTypes)
Appends a
@link inline block for the target method into this builder. |
JavadocBuilder |
linkMethod(Type type,
SimpleName name,
List<? extends Type> parameterTypes)
Appends a
@link inline block for the target method into this builder. |
JavadocBuilder |
linkMethod(Type type,
SimpleName name,
Type... parameterTypes)
Appends a
@link inline block for the target method into this builder. |
JavadocBuilder |
linkMethod(Type type,
String name,
List<? extends Type> parameterTypes)
Appends a
@link inline block for the target method into this builder. |
JavadocBuilder |
linkMethod(Type type,
String name,
Type... parameterTypes)
Appends a
@link inline block for the target method into this builder. |
JavadocBuilder |
linkType(Type type)
Appends a
@link inline block for the target type into this builder. |
JavadocBuilder |
param(SimpleName name)
Starts a
@param tag block for the target parameter in this builder. |
JavadocBuilder |
param(String name)
Starts a
@param tag block for the target parameter in this builder. |
JavadocBuilder |
returns()
Starts a
@return tag block in this builder. |
JavadocBuilder |
see(DocElement element)
Starts
@see tag block about the specified element in this builder. |
JavadocBuilder |
seeField(SimpleName name)
Starts a
@see tag block for the target field in this builder. |
JavadocBuilder |
seeField(String name)
Starts a
@see tag block for the target field in this builder. |
JavadocBuilder |
seeField(Type type,
SimpleName name)
Starts a
@see tag block for the target field in this builder. |
JavadocBuilder |
seeField(Type type,
String name)
Starts a
@see tag block for the target field in this builder. |
JavadocBuilder |
seeMethod(SimpleName name,
List<? extends Type> parameterTypes)
Starts a
@see tag block for the target method in this builder. |
JavadocBuilder |
seeMethod(SimpleName name,
Type... parameterTypes)
Starts a
@see tag block for the target method in this builder. |
JavadocBuilder |
seeMethod(String name,
List<? extends Type> parameterTypes)
Starts a
@see tag block for the target method in this builder. |
JavadocBuilder |
seeMethod(String name,
Type... parameterTypes)
Starts a
@see tag block for the target method in this builder. |
JavadocBuilder |
seeMethod(Type type,
SimpleName name,
List<? extends Type> parameterTypes)
Starts
@see tag block about the specified element in this builder. |
JavadocBuilder |
seeMethod(Type type,
SimpleName name,
Type... parameterTypes)
Starts
@see tag block about the specified element in this builder. |
JavadocBuilder |
seeMethod(Type type,
String name,
List<? extends Type> parameterTypes)
Starts a
@see tag block for the target method in this builder. |
JavadocBuilder |
seeMethod(Type type,
String name,
Type... parameterTypes)
Starts a
@see tag block for the target method in this builder. |
JavadocBuilder |
seeType(Type type)
Starts a
@see tag block for the target type in this builder. |
JavadocBuilder |
text(String pattern,
Object... arguments)
Appends a plain text into this builder.
|
Javadoc |
toJavadoc()
Returns the built
Javadoc object. |
JavadocBuilder |
typeParam(SimpleName name)
Starts a
@param tag block for the target type parameter in this builder. |
JavadocBuilder |
typeParam(String name)
Starts a
@param tag block for the target type parameter in this builder. |
JavadocBuilder |
typeParam(Type typeVariable)
Starts a
@param tag block for the target type parameter in this builder. |
public JavadocBuilder(ModelFactory factory)
factory
- the Java DOM factoryIllegalArgumentException
- if the parameter is null
public JavadocBuilder copy()
public JavadocBuilder block(String tag)
tag
- the block tag (the starting "@"
can be omitted)IllegalArgumentException
- if the parameter is null
public JavadocBuilder inline(DocElement element)
element
- the target elementIllegalArgumentException
- if the parameter is null
public JavadocBuilder inline(List<? extends DocElement> elems)
elems
- the target elementsIllegalArgumentException
- if the parameter is null
public JavadocBuilder inline(String pattern, JavadocBuilder.Placeholder... placeholders)
pattern
- the pattern string that can include {n}
placeholders
- the placeholdersIllegalArgumentException
- if the parameter is null
public JavadocBuilder param(String name)
@param
tag block for the target parameter in this builder.
The current building block will be finished before this operation.name
- the target parameter nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder param(SimpleName name)
@param
tag block for the target parameter in this builder.
The current building block will be finished before this operation.name
- the target parameter nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder typeParam(String name)
@param
tag block for the target type parameter in this builder.
The current building block will be finished before this operation.name
- the target parameter nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder typeParam(SimpleName name)
@param
tag block for the target type parameter in this builder.
The current building block will be finished before this operation.name
- the target parameter nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder typeParam(Type typeVariable)
@param
tag block for the target type parameter in this builder.
The current building block will be finished before this operation.typeVariable
- the type variableIllegalArgumentException
- if the parameter is null
public JavadocBuilder returns()
@return
tag block in this builder.
The current building block will be finished before this operation.public JavadocBuilder exception(Type type)
@throws
tag block for the target type in this builder.
The current building block will be finished before this operation.type
- the target exception typeIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeType(Type type)
@see
tag block for the target type in this builder.
The current building block will be finished before this operation.type
- the target typepublic JavadocBuilder seeField(String name)
@see
tag block for the target field in this builder.
The current building block will be finished before this operation.name
- the target field nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeField(Type type, String name)
@see
tag block for the target field in this builder.
The current building block will be finished before this operation.type
- the target field typename
- the target field nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeField(SimpleName name)
@see
tag block for the target field in this builder.
The current building block will be finished before this operation.name
- the target field nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeField(Type type, SimpleName name)
@see
tag block for the target field in this builder.
The current building block will be finished before this operation.type
- the target field typename
- the target field nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeMethod(String name, Type... parameterTypes)
@see
tag block for the target method in this builder.
The current building block will be finished before this operation.name
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeMethod(String name, List<? extends Type> parameterTypes)
@see
tag block for the target method in this builder.
The current building block will be finished before this operation.name
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeMethod(SimpleName name, Type... parameterTypes)
@see
tag block for the target method in this builder.
The current building block will be finished before this operation.name
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeMethod(SimpleName name, List<? extends Type> parameterTypes)
@see
tag block for the target method in this builder.
The current building block will be finished before this operation.name
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeMethod(Type type, String name, Type... parameterTypes)
@see
tag block for the target method in this builder.
The current building block will be finished before this operation.type
- the target method typename
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeMethod(Type type, String name, List<? extends Type> parameterTypes)
@see
tag block for the target method in this builder.
The current building block will be finished before this operation.type
- the target method typename
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeMethod(Type type, SimpleName name, Type... parameterTypes)
@see
tag block about the specified element in this builder.
The current building block will be finished before this operation.type
- the target method typename
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder seeMethod(Type type, SimpleName name, List<? extends Type> parameterTypes)
@see
tag block about the specified element in this builder.
The current building block will be finished before this operation.type
- the target method typename
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder see(DocElement element)
@see
tag block about the specified element in this builder.
The current building block will be finished before this operation.element
- the target elementIllegalArgumentException
- if the parameter is null
public JavadocBuilder text(String pattern, Object... arguments)
pattern
- the text pattern in form of MessageFormat.format(String, Object...)
arguments
- the arguments for the patternIllegalArgumentException
- if the parameter is null
public JavadocBuilder code(String pattern, Object... arguments)
@code
inline block into this builder.pattern
- the text pattern in form of MessageFormat.format(String, Object...)
arguments
- the arguments for the patternIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkType(Type type)
@link
inline block for the target type into this builder.type
- the target typepublic JavadocBuilder linkField(String name)
@link
inline block for the target field into this builder.name
- the target field nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkField(Type type, String name)
@link
inline block for the target field into this builder.type
- the target field typename
- the target field nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkField(SimpleName name)
@link
inline block for the target field into this builder.name
- the target field nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkField(Type type, SimpleName name)
@link
inline block for the target field into this builder.type
- the target field typename
- the target field nameIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkMethod(String name, Type... parameterTypes)
@link
inline block for the target method into this builder.name
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkMethod(String name, List<? extends Type> parameterTypes)
@link
inline block for the target method into this builder.name
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkMethod(SimpleName name, Type... parameterTypes)
@link
inline block for the target method into this builder.name
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkMethod(SimpleName name, List<? extends Type> parameterTypes)
@link
inline block for the target method into this builder.name
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkMethod(Type type, String name, Type... parameterTypes)
@link
inline block for the target method into this builder.type
- the target method typename
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkMethod(Type type, String name, List<? extends Type> parameterTypes)
@link
inline block for the target method into this builder.type
- the target method typename
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkMethod(Type type, SimpleName name, Type... parameterTypes)
@link
inline block for the target method into this builder.type
- the target method typename
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder linkMethod(Type type, SimpleName name, List<? extends Type> parameterTypes)
@link
inline block for the target method into this builder.type
- the target method typename
- the target method nameparameterTypes
- the target method parameter typesIllegalArgumentException
- if the parameter is null
public JavadocBuilder link(DocElement element)
@link
inline block for the target element into this builder.element
- the target elementIllegalArgumentException
- if the parameter is null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.