Object#toString() and method to a class if the Enhance annotation is present and no
explicit method declaration was added. This plugin does not need to be closed.
| Modifier and Type | Class and Description |
|---|---|
| public static @interface | ToStringPlugin.
Instructs the |
| public static @interface | ToStringPlugin.
Determines that the annotated field is excluded from a string representation of the |
| Modifier and Type | Field and Description |
|---|---|
| private static final MethodDescription. | ENHANCE_INCLUDE_SYNTHETIC_FIELDS
A description of the |
| private static final MethodDescription. | ENHANCE_PREFIX
A description of the |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public DynamicType. | apply(DynamicType.
The builder to use as a basis for the applied transformation. builder,The type being transformed. typeDescription, ClassFileLocator A class file locator that can locate other types in the scope of the project. classFileLocator)Implements org. |
| public void | close()
Implements java. |
| public Plugin | make()
Implements org. |
| public boolean | matches(TypeDescription
The instance to be matched or target)null.Implements org. |
| ENHANCE_INCLUDE_SYNTHETIC_FIELDS | back to summary |
|---|---|
| private static final MethodDescription. A description of the | |
| ENHANCE_PREFIX | back to summary |
|---|---|
| private static final MethodDescription. A description of the | |
| ToStringPlugin | back to summary |
|---|---|
| public ToStringPlugin() | |
| apply | back to summary |
|---|---|
| public DynamicType. Implements org. Doc from org. Applies this plugin.
| |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in | |
| make | back to summary |
|---|---|
| public Plugin make() Implements org. Doc from org. Returns a plugin that can be used for a transformation and which is subsequently closed.
| |
| matches | back to summary |
|---|---|
| public boolean matches(TypeDescription target) Implements org. Doc from org. Matches a target against this element matcher.
| |
ToStringPlugin to generate a Object#toString() method for the annotated class unless this method
is already declared explicitly.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | ToStringPlugin.
A strategy for defining a prefix. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if synthetic fields should be included.Determines if synthetic fields should be included in the string representation. |
| public ToStringPlugin. | Returns: The prefix to use.Determines the prefix to be used for the string representation prior to adding field values. |
| includeSyntheticFields | back to summary |
|---|---|
| public boolean includeSyntheticFields() Determines if synthetic fields should be included in the string representation.
| |
| prefix | back to summary |
|---|---|
| public ToStringPlugin. Determines the prefix to be used for the string representation prior to adding field values.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final ToStringPlugin. | CANONICAL
Determines the use of the canonical class name as a prefix. |
| public static final ToStringPlugin. | FULLY_QUALIFIED
Determines the use of a fully qualified class name as a prefix. |
| private final ToStringMethod. | prefixResolver
The prefix resolver to use. |
| public static final ToStringPlugin. | SIMPLE
Determines the use of the simple class name as a prefix. |
| Access | Constructor and Description |
|---|---|
| private | Prefix(ToStringMethod.
The prefix resolver to use. prefixResolverCreates a new prefix. |
| Modifier and Type | Method and Description |
|---|---|
| protected ToStringMethod. | |
| public static ToStringPlugin. | |
| public static ToStringPlugin. |
| CANONICAL | back to summary |
|---|---|
| public static final ToStringPlugin. Determines the use of the canonical class name as a prefix. | |
| FULLY_QUALIFIED | back to summary |
|---|---|
| public static final ToStringPlugin. Determines the use of a fully qualified class name as a prefix. | |
| prefixResolver | back to summary |
|---|---|
| private final ToStringMethod. The prefix resolver to use. | |
| SIMPLE | back to summary |
|---|---|
| public static final ToStringPlugin. Determines the use of the simple class name as a prefix. | |
| Prefix | back to summary |
|---|---|
| private Prefix(ToStringMethod. Creates a new prefix.
| |
| getPrefixResolver | back to summary |
|---|---|
| protected ToStringMethod. Returns the prefix resolver to use.
| |
| valueOf | back to summary |
|---|---|
| public static ToStringPlugin. | |
| values | back to summary |
|---|---|
| public static ToStringPlugin. | |
ToStringPlugin.