|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.ide.common.server.rules.SuggestionCompletionLoader
public class SuggestionCompletionLoader
This utility class loads suggestion completion stuff for the package configuration, introspecting from models, templates etc.
This also includes DSL stuff, basically, everything you need to get started with a package. It also validates the package configuration, and can provide errors. This does NOT validate assets in the package, other then to load up DSLs, models etc as needed. FYI: the tests for this are in the BRMS module, in context of a full BRMS.
Nested Class Summary | |
---|---|
static interface |
SuggestionCompletionLoader.ExternalImportDescrProvider
Interface used for add external ImportDescr added to SuggestionCompletionEngine Use this to add Fact Types that are not imported by the package. |
Constructor Summary | |
---|---|
SuggestionCompletionLoader()
This uses the current classes classloader as a base, and jars can be added. |
|
SuggestionCompletionLoader(ClassLoader classLoader)
This allows a pre existing classloader to be used (and preferred) for resolving types. |
Method Summary | |
---|---|
void |
addExternalImportDescrProvider(SuggestionCompletionLoader.ExternalImportDescrProvider provider)
|
List<String> |
getErrors()
Returns a list of String errors. |
Set<org.drools.lang.descr.ImportDescr> |
getExternalImportDescrs()
|
String |
getShortNameOfClass(String clazz)
|
SuggestionCompletionEngine |
getSuggestionEngine(String header,
List<JarInputStream> jars,
List<org.drools.lang.dsl.DSLTokenizedMappingFile> dsls)
This will validate, and generate a new engine, ready to go. |
SuggestionCompletionEngine |
getSuggestionEngine(String header,
List<JarInputStream> jars,
List<org.drools.lang.dsl.DSLTokenizedMappingFile> dsls,
List<String> dataEnums)
This will validate, and generate a new engine, ready to go. |
boolean |
hasErrors()
|
List<String> |
removeIrrelevantFields(Collection<String> fields)
This will remove the unneeded "fields" that come from java.lang.Object these are really not needed for the modeller. |
String |
translateClassToGenericType(Class<?> type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SuggestionCompletionLoader()
public SuggestionCompletionLoader(ClassLoader classLoader)
Method Detail |
---|
public SuggestionCompletionEngine getSuggestionEngine(String header, List<JarInputStream> jars, List<org.drools.lang.dsl.DSLTokenizedMappingFile> dsls)
header
- The package configuration file content.jars
- a list of jars to look inside (pass in empty array if not
needed) this is a list of JarInputStream
dsls
- any dsl files. This is a list of DSLMappingFile
.
public SuggestionCompletionEngine getSuggestionEngine(String header, List<JarInputStream> jars, List<org.drools.lang.dsl.DSLTokenizedMappingFile> dsls, List<String> dataEnums)
header
- The package configuration file content.jars
- a list of jars to look inside (pass in empty array if not
needed) this is a list of JarInputStream
dsls
- any dsl files. This is a list of DSLMappingFile
.dataEnums
- this is a list of String's which hold data enum definitions.
(normally will be just one, but for completeness can load
multiple).
public String getShortNameOfClass(String clazz)
public List<String> removeIrrelevantFields(Collection<String> fields)
public String translateClassToGenericType(Class<?> type)
translateClassToGenericType
in interface ClassToGenericClassConverter
public void addExternalImportDescrProvider(SuggestionCompletionLoader.ExternalImportDescrProvider provider)
public Set<org.drools.lang.descr.ImportDescr> getExternalImportDescrs()
public boolean hasErrors()
public List<String> getErrors()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |