Class PackageBuildContext

  • Direct Known Subclasses:
    RuleBuildContext

    public class PackageBuildContext
    extends Object
    A context for the current build
    • Constructor Detail

      • PackageBuildContext

        public PackageBuildContext()
    • Method Detail

      • getParentDescr

        public BaseDescr getParentDescr()
      • setParentDescr

        public void setParentDescr​(BaseDescr descr)
      • getDialect

        public Dialect getDialect()
      • setDialect

        public void setDialect​(Dialect dialect)
        Allows the change of the current dialect in the context
      • getErrors

        public List<DroolsError> getErrors()
        Returns the list of errors found while building the current context
        Returns:
      • addError

        public void addError​(DroolsError error)
      • getPkg

        public org.drools.core.definitions.InternalKnowledgePackage getPkg()
        Returns the current package being built
        Returns:
      • getDescrLookup

        public BaseDescr getDescrLookup​(String className)
        Returns the Map of descriptor lookups
        Returns:
      • addDescrLookups

        public void addDescrLookups​(String className,
                                    BaseDescr baseDescr)
      • getInvokerLookup

        public Object getInvokerLookup​(String className)
      • addInvokerLookup

        public void addInvokerLookup​(String className,
                                     Object invokerLookup)
      • getInvokers

        public Map<String,​String> getInvokers()
        Returns the Map of generated invokers
        Returns:
      • addInvoker

        public void addInvoker​(String invokerClassName,
                               String invoker)
      • getMethods

        public List<String> getMethods()
        Returns the list of generated methods
        Returns:
      • addMethod

        public void addMethod​(String method)
      • getCurrentId

        public int getCurrentId()
        Returns current counter value for generated method names
        Returns:
      • getNextId

        public int getNextId()
      • isTypesafe

        public boolean isTypesafe()
      • setTypesafe

        public void setTypesafe​(boolean stricttype)
      • resolveVarType

        public Class<?> resolveVarType​(String identifier)