Beispiel #1
0
 static com.github.javaparser.ast.type.Type changeTypeContext(
     ResolutionContext old, ResolutionContext new_, com.github.javaparser.ast.type.Type t) {
   Type current = old.resolve(t);
   if (current.isClassType()) {
     return ResolutionContext.typeToJavaParserType(
         current.remapClassNames(new_::typeToJavaParserType));
   }
   return t;
 }
Beispiel #2
0
 private com.github.javaparser.ast.type.Type toType(Type t) {
   String name = getContext().typeToString(t);
   if (t.isPrimitiveType()) {
     return new PrimitiveType(JVMUtil.searchEnum(PrimitiveType.Primitive.class, name));
   } else {
     return new ClassOrInterfaceType(name);
   }
 }