1
1
package com .ztianzeng .apidoc ;
2
2
3
- import com .fasterxml .jackson .databind .type .TypeFactory ;
4
3
import com .thoughtworks .qdox .model .JavaClass ;
5
4
import com .ztianzeng .apidoc .converter .AnnotatedType ;
6
5
import com .ztianzeng .apidoc .converter .ModelConverter ;
@@ -83,8 +82,9 @@ public Schema resolve(Type type) {
83
82
public Schema resolve (JavaClass type ) {
84
83
return resolve (new AnnotatedType ().javaClass (type ));
85
84
}
85
+
86
86
public Schema resolve (AnnotatedType type ) {
87
- if (shouldProcess (type .getType ())) {
87
+ if (shouldProcess (type .getJavaClass ())) {
88
88
ModelConverterContextImpl context = new ModelConverterContextImpl (converters );
89
89
90
90
log .debug ("ModelConverters readAll from " + type );
@@ -93,20 +93,6 @@ public Schema resolve(AnnotatedType type) {
93
93
return null ;
94
94
}
95
95
96
- @ Deprecated
97
- private boolean shouldProcess (Type type ) {
98
- final Class <?> cls = TypeFactory .defaultInstance ().constructType (type ).getRawClass ();
99
- if (cls .isPrimitive ()) {
100
- return false ;
101
- }
102
- String className = cls .getName ();
103
- for (String packageName : skippedPackages ) {
104
- if (className .startsWith (packageName )) {
105
- return false ;
106
- }
107
- }
108
- return !skippedClasses .contains (className );
109
- }
110
96
111
97
private boolean shouldProcess (JavaClass javaClass ) {
112
98
if (javaClass .isPrimitive ()) {
@@ -123,7 +109,7 @@ private boolean shouldProcess(JavaClass javaClass) {
123
109
124
110
125
111
public ResolvedSchema readAllAsResolvedSchema (AnnotatedType type ) {
126
- if (shouldProcess (type .getType ())) {
112
+ if (shouldProcess (type .getJavaClass ())) {
127
113
ModelConverterContextImpl context = new ModelConverterContextImpl (
128
114
converters );
129
115
0 commit comments