Browse Source

Merge pull request #141 in CORE/base-third from ~JU/base-third:10.0 to 10.0

* commit '3cfcbfccf26ac700d7dd77b677ec22a5f8a23c66':
  fix
10.0
ju 6 years ago
parent
commit
a62e034ba5
  1. 13
      fine-druid/fine-druid.iml
  2. 18
      fine-hibernate/fine-hibernate.iml
  3. 11
      fine-jackson/src/com/fr/third/fasterxml/jackson/databind/type/ClassFactory.java
  4. 18
      fine-jackson/src/com/fr/third/fasterxml/jackson/databind/type/TypeFactory.java

13
fine-druid/fine-druid.iml

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="lib-druid" level="project" />
<orderEntry type="module" module-name="fine-hibernate" />
</component>
</module>

18
fine-hibernate/fine-hibernate.iml

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="fine-jboss-logging" />
<orderEntry type="module" module-name="fine-classmate" />
<orderEntry type="module" module-name="fine-jpa" />
<orderEntry type="library" name="lib-hibernate" level="project" />
<orderEntry type="module" module-name="fine-jboss-transaction-api" />
<orderEntry type="library" name="base-lib" level="project" />
</component>
</module>

11
fine-jackson/src/com/fr/third/fasterxml/jackson/databind/type/ClassFactory.java

@ -0,0 +1,11 @@
package com.fr.third.fasterxml.jackson.databind.type;
/**
* Created by juhaoyu on 2018/11/5.
*/
public interface ClassFactory {
Class<?> classForName(String className);
Class<?> classForName(String className, ClassLoader classLoader);
}

18
fine-jackson/src/com/fr/third/fasterxml/jackson/databind/type/TypeFactory.java

@ -103,13 +103,21 @@ public final class TypeFactory
* ClassLoader used by this factory (Issue #624) * ClassLoader used by this factory (Issue #624)
*/ */
protected final ClassLoader _classLoader; protected final ClassLoader _classLoader;
private ClassFactory classFactory;
/* /*
/********************************************************** /**********************************************************
/* Life-cycle /* Life-cycle
/********************************************************** /**********************************************************
*/ */
public void setClassFactory(ClassFactory classFactory) {
this.classFactory = classFactory;
}
private TypeFactory() { private TypeFactory() {
_parser = new TypeParser(this); _parser = new TypeParser(this);
_modifiers = null; _modifiers = null;
@ -247,10 +255,18 @@ public final class TypeFactory
protected Class<?> classForName(String name, boolean initialize, protected Class<?> classForName(String name, boolean initialize,
ClassLoader loader) throws ClassNotFoundException { ClassLoader loader) throws ClassNotFoundException {
if (classFactory != null) {
return classFactory.classForName(name, loader);
}
return Class.forName(name, true, loader); return Class.forName(name, true, loader);
} }
protected Class<?> classForName(String name) throws ClassNotFoundException { protected Class<?> classForName(String name) throws ClassNotFoundException {
if (classFactory != null) {
return classFactory.classForName(name);
}
return Class.forName(name); return Class.forName(name);
} }

Loading…
Cancel
Save