|
|
@ -9,9 +9,13 @@ import com.fr.stable.fun.mark.API; |
|
|
|
@API(level = DefaultValueAdjustProvider.CURRENT_LEVEL) |
|
|
|
@API(level = DefaultValueAdjustProvider.CURRENT_LEVEL) |
|
|
|
public abstract class AbstractDefaultValueAdjustProvider extends AbstractProvider implements DefaultValueAdjustProvider { |
|
|
|
public abstract class AbstractDefaultValueAdjustProvider extends AbstractProvider implements DefaultValueAdjustProvider { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//1.16及之前发布版本插件里面没有实现currentAPILevel方法,运行时候会走到主jar,拿到-2。
|
|
|
|
|
|
|
|
//1.16.1及之后发布版本插件实现currentAPILevel方法,编译插件的时候,会把DefaultValueAdjustProvider.CURRENT_LEVEL的值编译给插件,比如1.16.1会拿到2。
|
|
|
|
|
|
|
|
private static final int OLD_CURRENT_LEVEL = -2; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public int currentAPILevel() { |
|
|
|
public int currentAPILevel() { |
|
|
|
return CURRENT_LEVEL; |
|
|
|
return OLD_CURRENT_LEVEL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String mark4Provider() { |
|
|
|
public String mark4Provider() { |
|
|
|