Package org.drools.compiler.builder.impl
Class TypeDeclarationUtils
java.lang.Object
org.drools.compiler.builder.impl.TypeDeclarationUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?>getClassForType(String type, ClassLoader loader) static Class<?>static booleanisCompatible(Class<?> typeClass, AbstractClassTypeDeclarationDescr typeDescr) static booleanisNovelClass(AbstractClassTypeDeclarationDescr typeDescr, PackageRegistry reg) static booleanisQualified(String name) static StringlookupSimpleNameByImports(String name, AbstractClassTypeDeclarationDescr typeDescr, PackageDescr packageDescr, ClassLoader loader) static voidprocessModifiedProps(Class<?> cls, ClassDefinition clsDef) static StringresolveType(String klass, PackageDescr packageDescr, PackageRegistry pkgRegistry) Tries to determine the namespace (package) of a simple type chosen to be the superclass of a declared bean.static StringrewriteInitExprWithImports(String expr, org.drools.util.TypeResolver typeResolver) static StringtoBuildableType(String className, ClassLoader loader) static StringtypeName2ClassName(String type, ClassLoader loader)
-
Constructor Details
-
TypeDeclarationUtils
public TypeDeclarationUtils()
-
-
Method Details
-
lookupSimpleNameByImports
public static String lookupSimpleNameByImports(String name, AbstractClassTypeDeclarationDescr typeDescr, PackageDescr packageDescr, ClassLoader loader) -
getExistingDeclarationClass
public static Class<?> getExistingDeclarationClass(AbstractClassTypeDeclarationDescr typeDescr, PackageRegistry reg) -
resolveType
public static String resolveType(String klass, PackageDescr packageDescr, PackageRegistry pkgRegistry) Tries to determine the namespace (package) of a simple type chosen to be the superclass of a declared bean. Looks among imports, local declarations and previous declarations. Means that a class can't extend another class declared in package that has not been loaded yet.- Parameters:
klass- the simple name of the classpackageDescr- the descriptor of the package the base class is declared inpkgRegistry- the current package registry- Returns:
- the fully qualified name of the superclass
-
typeName2ClassName
-
getClassForType
-
isCompatible
-
isQualified
-
isNovelClass
public static boolean isNovelClass(AbstractClassTypeDeclarationDescr typeDescr, PackageRegistry reg) -
rewriteInitExprWithImports
-
toBuildableType
-
processModifiedProps
-