Annotation Type HtmlLink
@Documented
@Target({TYPE,METHOD})
@Retention(RUNTIME)
@Inherited
@Repeatable(Array.class)
@ContextApply(Apply.class)
public @interface HtmlLink
Used in conjunction with the
HtmlSerializer
class to define hyperlinks.
Can be used in the following locations:
- Classes.
@Rest -annotated classes and@RestOp -annotated methods when anon()
value is specified.
Annotation that can be used to specify that a class has a URL associated with it.
When rendered using the HtmlSerializer
class, this class will get
rendered as a hyperlink like so...
See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe bean property whose value becomes the name in the hyperlink.String[]
Dynamically apply this annotation to the specified classes.Class<?>[]
Dynamically apply this annotation to the specified classes.The bean property whose value becomes the url in the hyperlink.
-
Element Details
-
nameProperty
The bean property whose value becomes the name in the hyperlink.- Returns:
- The annotation value.
- Default:
- "name"
-
on
Dynamically apply this annotation to the specified classes.Used in conjunction with
BeanContext.Builder.applyAnnotations(Class...)
to dynamically apply an annotation to an existing class. It is ignored when the annotation is applied directly to classes.Valid patterns:
- Classes:
- Fully qualified:
"com.foo.MyClass" - Fully qualified inner class:
"com.foo.MyClass$Inner1$Inner2" - Simple:
"MyClass" - Simple inner:
"MyClass$Inner1$Inner2" or"Inner1$Inner2" or"Inner2"
- Fully qualified:
- A comma-delimited list of anything on this list.
See Also:
- Returns:
- The annotation value.
- Default:
- {}
- Classes:
-
onClass
Dynamically apply this annotation to the specified classes.Identical to
on()
except allows you to specify class objects instead of a strings.See Also:
- Returns:
- The annotation value.
- Default:
- {}
-
uriProperty
The bean property whose value becomes the url in the hyperlink.- Returns:
- The annotation value.
- Default:
- "uri"
-