public interface FactType extends Externalizable
Modifier and Type | Method and Description |
---|---|
Object |
get(Object bean,
String field)
Gets the value of the specified field on the dynamic fact.
|
Map<String,Object> |
getAsMap(Object bean)
Get a map of the fields and their values for the bean.
|
List<Annotation> |
getClassAnnotations()
Returns the list of class-level annotations
used in this class definition
|
Class<?> |
getFactClass()
Returns the Class<?
|
FactField |
getField(String name)
Returns the FactField identified by the given name.
|
List<FactField> |
getFields()
Returns the list of FactField in this FactType
|
Map<String,Object> |
getMetaData()
Returns the annotations of this class definition as
key-value pairs.
|
String |
getName()
Returns the name of the FactType.
|
String |
getPackageName()
Returns the package this FactType is defined in.
|
String |
getSimpleName()
Returns the unqualified name of the FactType.
|
String |
getSuperClass()
Returns the name of the FactType's super type
|
Object |
newInstance()
Create a new fact based on the declared fact type.
|
void |
set(Object bean,
String field,
Object value)
Sets the value of the field on a fact.
|
void |
setFromMap(Object bean,
Map<String,Object> values)
Sets the values of the bean from a map.
|
readExternal, writeExternal
String getName()
String getSimpleName()
String getPackageName()
String getSuperClass()
List<FactField> getFields()
FactField getField(String name)
name
- the name of the FactFieldClass<?> getFactClass()
Object newInstance() throws InstantiationException, IllegalAccessException
void set(Object bean, String field, Object value)
bean
- the object on which the field will be set.field
- the name of the field to set.value
- the value to be set on the field.Object get(Object bean, String field)
bean
- the fact to read the field value from.field
- the name of the field to read.Map<String,Object> getAsMap(Object bean)
bean
- the bean to read the fields from.void setFromMap(Object bean, Map<String,Object> values)
bean
- the fact to set the values of the fields onvalues
- a map of field names and values to setList<Annotation> getClassAnnotations()
Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.