xul0038 commented on issue #5122:
URL: https://github.com/apache/dubbo/issues/5122#issuecomment-888736584


   1.创建自定义TypeBuilder
   ```
   package com.xxx.dubbo.TreeBuilder;
   
   public class TreeBuilder implements TypeBuilder , Prioritized {
   
       @Override
       public boolean accept(Type type, Class<?> clazz) {
           if (clazz == null) {
               return false;
           }
           return Tree.class.isAssignableFrom(clazz);
       }
   
       @Override
       public int getPriority() {
           return -1;
       }
   
       @Override
       public TypeDefinition build(Type type, Class<?> clazz, Map<Class<?>, 
TypeDefinition> typeCache) {
           // balabala...
       }
   }
   ```
   2. 
`META-INF`下创建`dubbo/internal/org.apache.dubbo.metadata.definition.builder.TypeBuilder`文件
   ```
   tree=com.xxx.dubbo.TreeBuilder
   ```
   #6306


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to