Class TypeDeclarationUtils

java.lang.Object
org.drools.compiler.builder.impl.TypeDeclarationUtils

public class TypeDeclarationUtils extends Object
  • 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 class
      packageDescr - the descriptor of the package the base class is declared in
      pkgRegistry - the current package registry
      Returns:
      the fully qualified name of the superclass
    • typeName2ClassName

      public static String typeName2ClassName(String type, ClassLoader loader)
    • getClassForType

      public static Class<?> getClassForType(String type, ClassLoader loader)
    • isCompatible

      public static boolean isCompatible(Class<?> typeClass, AbstractClassTypeDeclarationDescr typeDescr)
    • isQualified

      public static boolean isQualified(String name)
    • isNovelClass

      public static boolean isNovelClass(AbstractClassTypeDeclarationDescr typeDescr, PackageRegistry reg)
    • rewriteInitExprWithImports

      public static String rewriteInitExprWithImports(String expr, org.drools.util.TypeResolver typeResolver)
    • toBuildableType

      public static String toBuildableType(String className, ClassLoader loader)
    • processModifiedProps

      public static void processModifiedProps(Class<?> cls, ClassDefinition clsDef)