diecui1202 commented on a change in pull request #2554: code format
URL: https://github.com/apache/incubator-dubbo/pull/2554#discussion_r220438910
 
 

 ##########
 File path: 
dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/ClassGenerator.java
 ##########
 @@ -46,288 +47,345 @@
  * ClassGenerator
  */
 public final class ClassGenerator {
-    private static final AtomicLong CLASS_NAME_COUNTER = new AtomicLong(0);
-    private static final String SIMPLE_NAME_TAG = "<init>";
-    private static final Map<ClassLoader, ClassPool> POOL_MAP = new 
ConcurrentHashMap<ClassLoader, ClassPool>(); //ClassLoader - ClassPool
-    private ClassPool mPool;
-    private CtClass mCtc;
-    private String mClassName, mSuperClass;
-    private Set<String> mInterfaces;
-    private List<String> mFields, mConstructors, mMethods;
-    private Map<String, Method> mCopyMethods; // <method desc,method instance>
-    private Map<String, Constructor<?>> mCopyConstructors; // <constructor 
desc,constructor instance>
-    private boolean mDefaultConstructor = false;
-
-    private ClassGenerator() {
-    }
-
-    private ClassGenerator(ClassPool pool) {
-        mPool = pool;
-    }
-
-    public static ClassGenerator newInstance() {
-        return new 
ClassGenerator(getClassPool(Thread.currentThread().getContextClassLoader()));
-    }
-
-    public static ClassGenerator newInstance(ClassLoader loader) {
-        return new ClassGenerator(getClassPool(loader));
-    }
-
-    public static boolean isDynamicClass(Class<?> cl) {
-        return ClassGenerator.DC.class.isAssignableFrom(cl);
-    }
-
-    public static ClassPool getClassPool(ClassLoader loader) {
-        if (loader == null)
-            return ClassPool.getDefault();
 
-        ClassPool pool = POOL_MAP.get(loader);
-        if (pool == null) {
-            pool = new ClassPool(true);
-            pool.appendClassPath(new LoaderClassPath(loader));
-            POOL_MAP.put(loader, pool);
-        }
-        return pool;
-    }
-
-    private static String modifier(int mod) {
-        StringBuilder modifier = new StringBuilder();
-        if (Modifier.isPublic(mod)) modifier.append("public");
-        if (Modifier.isProtected(mod)) modifier.append("protected");
-        if (Modifier.isPrivate(mod)) modifier.append("private");
-
-        if (Modifier.isStatic(mod)) modifier.append(" static");
-        if (Modifier.isVolatile(mod)) modifier.append(" volatile");
+  private static final AtomicLong CLASS_NAME_COUNTER = new AtomicLong(0);
+  private static final String SIMPLE_NAME_TAG = "<init>";
 
 Review comment:
   what is the plugin you used? It's all ok on my mac.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to