Package org.drools.base.factmodel
Class ClassDefinition
java.lang.Object
org.drools.base.factmodel.ClassDefinition
- All Implemented Interfaces:
Externalizable,Serializable,FactType
Declares a class to be dynamically created
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClassDefinition(Class<?> cls) ClassDefinition(String className) ClassDefinition(String className, String superClass, String[] interfaces) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(AnnotationDefinition annotationDefinition) final voidaddField(FieldDefinition attr) Adds a field definition to this classfinal voidaddInterface(String interfaze) voidaddMetaData(String key, Object value) voidaddModifiedPropsByMethod(Method method, List<String> props) getAnnotation(Class<?> annotationClass) final Stringfinal Class<?>Class<?>getField(int index) Returns the field at position index, as defined by the builder using the @position annotationReturns the field definition object for the given field namegetFieldByAlias(String alias) final Collection<FieldDefinition>final String[]getMetaData(String name) getModifiedPropsByMethod(Method method) getModifiedPropsByMethod(String methodName, int args) getName()final Stringbooleanbooleanbooleanbooleanstatic StringmodifiedPropsByMethodKey(Method method) voidvoidvoidsetAbstrakt(boolean abstrakt) final voidsetClassName(String className) voidsetDefinedClass(Class<?> definedClass) voidsetFromMap(Object bean, Map<String, Object> data) final voidsetInterfaces(String[] interfaces) final voidsetSuperClass(String superClass) voidsetTraitable(boolean traitable) voidsetTraitable(boolean traitable, boolean enableLogical) toString()void
-
Field Details
-
fields
-
-
Constructor Details
-
ClassDefinition
public ClassDefinition() -
ClassDefinition
-
ClassDefinition
-
ClassDefinition
-
-
Method Details
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
getClassName
- Returns:
- Returns the name.
-
setClassName
- Parameters:
className- The name to set.
-
getDefinedClass
- Returns:
- Returns the className.
-
setDefinedClass
- Parameters:
definedClass- The class to set.
-
addField
Adds a field definition to this class- Parameters:
attr-
-
getFieldsDefinitions
- Returns:
- Returns an unmodifiable collection of field definitions
-
getField
Returns the field definition object for the given field name -
getFieldByAlias
-
getField
Returns the field at position index, as defined by the builder using the @position annotation- Parameters:
index-- Returns:
- the index-th field
-
getInterfaces
- Returns:
- Returns the interfaces.
-
setInterfaces
- Parameters:
interfaces- The interfaces to set.
-
addInterface
-
getSuperClass
- Specified by:
getSuperClassin interfaceFactType- Returns:
- Returns the superClass.
-
setSuperClass
- Parameters:
superClass- The superClass to set.
-
getName
-
getSimpleName
- Specified by:
getSimpleNamein interfaceFactType
-
getPackageName
- Specified by:
getPackageNamein interfaceFactType
-
newInstance
- Specified by:
newInstancein interfaceFactType- Throws:
InstantiationExceptionIllegalAccessException
-
getFactClass
- Specified by:
getFactClassin interfaceFactType
-
getFields
-
get
-
set
-
getAsMap
-
setFromMap
- Specified by:
setFromMapin interfaceFactType
-
addAnnotation
-
getAnnotations
-
getAnnotation
-
getClassAnnotations
- Specified by:
getClassAnnotationsin interfaceFactType
-
getMetaData
- Specified by:
getMetaDatain interfaceFactType
-
getMetaData
-
addMetaData
-
addModifiedPropsByMethod
-
getModifiedPropsByMethod
-
getModifiedPropsByMethod
-
modifiedPropsByMethodKey
-
isReactive
public boolean isReactive() -
isTraitable
public boolean isTraitable() -
setTraitable
public void setTraitable(boolean traitable) -
setTraitable
public void setTraitable(boolean traitable, boolean enableLogical) -
isFullTraiting
public boolean isFullTraiting() -
isAbstrakt
public boolean isAbstrakt() -
setAbstrakt
public void setAbstrakt(boolean abstrakt) -
toString
-