Class ClassDefinition

    • Constructor Detail

      • ClassDefinition

        public ClassDefinition()
      • ClassDefinition

        public ClassDefinition​(String className)
      • ClassDefinition

        public ClassDefinition​(String className,
                               String superClass,
                               String[] interfaces)
      • ClassDefinition

        public ClassDefinition​(Class<?> cls)
    • Method Detail

      • getClassName

        public final String getClassName()
        Returns:
        Returns the name.
      • setClassName

        public final void setClassName​(String className)
        Parameters:
        className - The name to set.
      • getDefinedClass

        public final Class<?> getDefinedClass()
        Returns:
        Returns the className.
      • setDefinedClass

        public void setDefinedClass​(Class<?> definedClass)
        Parameters:
        definedClass - The class to set.
      • addField

        public final void addField​(FieldDefinition attr)
        Adds a field definition to this class
        Parameters:
        attr -
      • getFieldsDefinitions

        public final Collection<FieldDefinition> getFieldsDefinitions()
        Returns:
        Returns an unmodifiable collection of field definitions
      • getField

        public FieldDefinition getField​(String fieldName)
        Returns the field definition object for the given field name
        Specified by:
        getField in interface org.kie.api.definition.type.FactType
        Parameters:
        fieldName -
        Returns:
      • getField

        public FieldDefinition getField​(int index)
        Returns the field at position index, as defined by the builder using the @position annotation
        Parameters:
        index -
        Returns:
        the index-th field
      • getInterfaces

        public final String[] getInterfaces()
        Returns:
        Returns the interfaces.
      • setInterfaces

        public final void setInterfaces​(String[] interfaces)
        Parameters:
        interfaces - The interfaces to set.
      • addInterface

        public final void addInterface​(String interfaze)
      • getSuperClass

        public final String getSuperClass()
        Specified by:
        getSuperClass in interface org.kie.api.definition.type.FactType
        Returns:
        Returns the superClass.
      • setSuperClass

        public final void setSuperClass​(String superClass)
        Parameters:
        superClass - The superClass to set.
      • getName

        public String getName()
        Specified by:
        getName in interface org.kie.api.definition.type.FactType
      • getSimpleName

        public String getSimpleName()
        Specified by:
        getSimpleName in interface org.kie.api.definition.type.FactType
      • getPackageName

        public String getPackageName()
        Specified by:
        getPackageName in interface org.kie.api.definition.type.FactType
      • getFactClass

        public Class<?> getFactClass()
        Specified by:
        getFactClass in interface org.kie.api.definition.type.FactType
      • getFields

        public List<org.kie.api.definition.type.FactField> getFields()
        Specified by:
        getFields in interface org.kie.api.definition.type.FactType
      • get

        public Object get​(Object bean,
                          String field)
        Specified by:
        get in interface org.kie.api.definition.type.FactType
      • set

        public void set​(Object bean,
                        String field,
                        Object value)
        Specified by:
        set in interface org.kie.api.definition.type.FactType
      • getAsMap

        public Map<String,​Object> getAsMap​(Object bean)
        Specified by:
        getAsMap in interface org.kie.api.definition.type.FactType
      • setFromMap

        public void setFromMap​(Object bean,
                               Map<String,​Object> data)
        Specified by:
        setFromMap in interface org.kie.api.definition.type.FactType
      • getClassAnnotations

        public List<org.kie.api.definition.type.Annotation> getClassAnnotations()
        Specified by:
        getClassAnnotations in interface org.kie.api.definition.type.FactType
      • getMetaData

        public Map<String,​Object> getMetaData()
        Specified by:
        getMetaData in interface org.kie.api.definition.type.FactType
      • addMetaData

        public void addMetaData​(String key,
                                Object value)
      • addModifiedPropsByMethod

        public void addModifiedPropsByMethod​(Method method,
                                             List<String> props)
      • getModifiedPropsByMethod

        public List<String> getModifiedPropsByMethod​(Method method)
      • getModifiedPropsByMethod

        public List<String> getModifiedPropsByMethod​(String methodName,
                                                     int args)
      • modifiedPropsByMethodKey

        public static String modifiedPropsByMethodKey​(Method method)
      • 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)