public interface ContentType extends Identity, Filter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
STRICT_INHERITANCE
Signals whether content is only allowed to be of the class
returned by
getContentClass() and not of some subclass
of it. |
COMPARATOR
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(java.lang.Object obj)
Checks the given argument (typically a
Class instance)
for compatibility with this content-type. |
java.lang.Class<?> |
getContentClass()
Returns the root class or interface that objects associated
with this
ContentType must extend or implement. |
java.lang.String |
getContentClassName() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Returns a read-only collection of properties in the form of
a key-value mapping.
|
static final java.lang.String STRICT_INHERITANCE
getContentClass()
and not of some subclass
of it.
The property type is boolean
and this property is only
effective when the return value of getContentClass()
is not a class describing an interface, array or enum.
java.lang.Class<?> getContentClass()
ContentType
must extend or implement.
This method must not return null
but is technically
allowed to return the Object
class.java.lang.String getContentClassName()
java.util.Map<java.lang.String,java.lang.Object> getProperties()
ContentType
does not
declare any properties it may either return an empty map or
null
.boolean accepts(java.lang.Object obj)
Class
instance)
for compatibility with this content-type.
Note that although all members of the content type framework
will call this method with a valid Class
argument, it
not explicitly required to do so! Custom implementations that
are designed to be used outside the framework might want to handle
arbitrary argument objects.
accepts
in interface Filter
Filter.accepts(java.lang.Object)