public final class ElementFormatter
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
annotationToString(java.lang.annotation.Annotation annotation)
Converts the provided
annotationValues to a string with
an annotation format using the specified annotationType |
static java.lang.String |
formatConstructor(java.lang.reflect.Constructor<?> constructor,
java.util.List<InjectedKey<?>> keys) |
static java.lang.String |
formatField(java.lang.reflect.Field field,
InjectedKey<?> key) |
static java.lang.String |
formatMethod(java.lang.reflect.Method method,
java.util.List<InjectedKey<?>> keys)
Formats a method to a human-friendly format like
|
public static java.lang.String formatField(java.lang.reflect.Field field,
InjectedKey<?> key)
public static java.lang.String formatConstructor(java.lang.reflect.Constructor<?> constructor,
java.util.List<InjectedKey<?>> keys)
public static java.lang.String formatMethod(java.lang.reflect.Method method,
java.util.List<InjectedKey<?>> keys)
MyClass#someMethod(@Nullable String, Object)
method - The method to formatkeys - The keys of the method parameterspublic static java.lang.String annotationToString(java.lang.annotation.Annotation annotation)
annotationValues to a string with
an annotation format using the specified annotationType
The returned string be like: @Annotation(value = "hello", year = 2020) @Named("hello") @Example(hello = "Hello", world = "World")
annotation - The annotation to convert