Package org.kohsuke.stapler.export
Class ClassAttributeBehaviour
- java.lang.Object
-
- org.kohsuke.stapler.export.ClassAttributeBehaviour
-
public abstract class ClassAttributeBehaviour extends Object
Setting that controls how the '_class' attribute will be produced in the output.Three basic constants are defined:
NONE
- No type information will show up in the output whatsoever
ALWAYS
- Every object gets the type information explicitly written out
IF_NEEDED
- Type information will be produced only when it is necessary, for example when the declared type and the actual type differ.
In addition,
simple()
can be used to produce just the simple name of the class, whereas by default full class name will be printed.- Author:
- Kohsuke Kawaguchi
- See Also:
ExportConfig.withClassAttribute(ClassAttributeBehaviour)
-
-
Field Summary
Fields Modifier and Type Field Description static ClassAttributeBehaviour
ALWAYS
static ClassAttributeBehaviour
IF_NEEDED
static ClassAttributeBehaviour
NONE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
print(Class t)
ClassAttributeBehaviour
simple()
String
toString()
-
-
-
Field Detail
-
NONE
public static final ClassAttributeBehaviour NONE
-
ALWAYS
public static final ClassAttributeBehaviour ALWAYS
-
IF_NEEDED
public static final ClassAttributeBehaviour IF_NEEDED
-
-