public TypeSource getClassSource(final KieModuleMetaData metaData, final Class<?> clazz) {
    // Was the Type declared in DRL
    if (metaData.getTypeMetaInfo(clazz).isDeclaredType()) {
      return TypeSource.DECLARED;
    }

    // Was the Type defined inside the project or within a dependency
    String fullyQualifiedClassName = clazz.getName();
    int innerClassIdentifierIndex = fullyQualifiedClassName.indexOf("$");
    if (innerClassIdentifierIndex > 0) {
      fullyQualifiedClassName = fullyQualifiedClassName.substring(0, innerClassIdentifierIndex);
    }
    if (javaResources.contains(fullyQualifiedClassName)) {
      return TypeSource.JAVA_PROJECT;
    }
    return TypeSource.JAVA_DEPENDENCY;
  }