Package org.drools.compiler.lang.descr
Class PackageDescr
- java.lang.Object
-
- org.drools.compiler.lang.descr.BaseDescr
-
- org.drools.compiler.lang.descr.PackageDescr
-
- All Implemented Interfaces:
Externalizable
,Serializable
,org.drools.core.rule.Namespaceable
,org.kie.api.definition.KieDescr
,org.kie.internal.definition.KnowledgeDescr
- Direct Known Subclasses:
CompositePackageDescr
public class PackageDescr extends BaseDescr implements org.drools.core.rule.Namespaceable, org.kie.internal.definition.KnowledgeDescr
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PackageDescr()
PackageDescr(String namespace)
PackageDescr(String namespace, String documentation)
-
Method Summary
-
Methods inherited from class org.drools.compiler.lang.descr.BaseDescr
accept, copyLocation, getColumn, getEndCharacter, getEndColumn, getEndLine, getLine, getNamespace, getResource, getStartCharacter, getText, isNegated, negate, positionAsString, replaceVariable, setEndCharacter, setEndLocation, setLocation, setNamespace, setResource, setStartCharacter, setText
-
-
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classBaseDescr
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classBaseDescr
- Throws:
IOException
-
getName
public String getName()
-
setName
public void setName(String name)
-
getDocumentation
public String getDocumentation()
-
setUnit
public void setUnit(UnitDescr unit)
-
getUnit
public UnitDescr getUnit()
-
addAllImports
public void addAllImports(Collection<ImportDescr> importEntries)
-
addImport
public void addImport(ImportDescr importEntry)
-
getImports
public List<ImportDescr> getImports()
-
addFunctionImport
public void addFunctionImport(FunctionImportDescr importFunction)
-
getFunctionImports
public List<FunctionImportDescr> getFunctionImports()
-
addAccumulateImport
public void addAccumulateImport(AccumulateImportDescr importAccumulate)
-
getAccumulateImports
public List<AccumulateImportDescr> getAccumulateImports()
-
addGlobal
public void addGlobal(GlobalDescr global)
-
getGlobals
public List<GlobalDescr> getGlobals()
-
addAttribute
public void addAttribute(AttributeDescr attribute)
-
getAttributes
public List<AttributeDescr> getAttributes()
-
getAttribute
public AttributeDescr getAttribute(String name)
-
addFunction
public void addFunction(FunctionDescr function)
-
getFunctions
public List<FunctionDescr> getFunctions()
-
addRule
public void addRule(RuleDescr rule)
-
afterRuleAdded
public void afterRuleAdded(RuleDescr rule)
-
addTypeDeclaration
public void addTypeDeclaration(TypeDeclarationDescr declaration)
-
getTypeDeclarations
public List<TypeDeclarationDescr> getTypeDeclarations()
-
addEntryPointDeclaration
public void addEntryPointDeclaration(EntryPointDeclarationDescr epDescr)
-
getEntryPointDeclarations
public Set<EntryPointDeclarationDescr> getEntryPointDeclarations()
-
getWindowDeclarations
public Set<WindowDeclarationDescr> getWindowDeclarations()
-
addWindowDeclaration
public void addWindowDeclaration(WindowDeclarationDescr window)
-
addEnumDeclaration
public void addEnumDeclaration(EnumDeclarationDescr declaration)
-
getEnumDeclarations
public List<EnumDeclarationDescr> getEnumDeclarations()
-
getClassAndEnumDeclarationDescrs
public List<AbstractClassTypeDeclarationDescr> getClassAndEnumDeclarationDescrs()
-
removeObjectsGeneratedFromResource
public void removeObjectsGeneratedFromResource(org.kie.api.io.Resource resource)
-
getPreferredPkgUUID
public Optional<String> getPreferredPkgUUID()
Get the pkgUUID to be used insidePackageModel
If empty, a default generated one will be used- Returns:
-
setPreferredPkgUUID
public void setPreferredPkgUUID(String preferredPkgUUID)
Set the pkgUUID to be used insidePackageModel
- Parameters:
preferredPkgUUID
-
-
-