From b1f96e97cb92626e265f20857d973b553953a361 Mon Sep 17 00:00:00 2001 From: yusu Date: Wed, 31 Jul 2024 15:12:17 +0800 Subject: [PATCH] rename extension --- .../{IExtensionPoint.java => Extension.java} | 2 +- .../common/extension/ExtensionInvoker.java | 4 +- .../common/extension/ExtensionManager.java | 38 +++++++++---------- .../engine/common/extension/Plugin.java | 4 +- .../common/extension/PluginManager.java | 20 +++++----- ...tension.java => ExtensionRealization.java} | 2 +- .../spec/ClassExtensionPointSpec.java | 4 +- .../extension/spec/ClassExtensionSpec.java | 12 +++--- .../extension/spec/ExtensionPointSpec.java | 8 ++-- .../common/extension/spec/ExtensionSpec.java | 8 ++-- .../spec/MethodExtensionPointSpec.java | 4 +- .../extension/spec/MethodExtensionSpec.java | 12 +++--- .../compiler/FlowClassLoaderFactory.java | 4 +- .../preruntime/compiler/JavaCompiler.java | 4 +- .../impl/DefaultFlowClassLoaderFactory.java | 4 +- .../compiler/impl/support/EcJavaCompiler.java | 4 +- .../impl/support/JdkJavaCompiler.java | 4 +- .../loader/DefaultFlowSourceLoader.java | 4 +- .../preruntime/loader/FlowSourceLoader.java | 4 +- 19 files changed, 73 insertions(+), 73 deletions(-) rename src/main/java/com/alibaba/compileflow/engine/common/extension/{IExtensionPoint.java => Extension.java} (70%) rename src/main/java/com/alibaba/compileflow/engine/common/extension/annotation/{Extension.java => ExtensionRealization.java} (90%) diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/IExtensionPoint.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/Extension.java similarity index 70% rename from src/main/java/com/alibaba/compileflow/engine/common/extension/IExtensionPoint.java rename to src/main/java/com/alibaba/compileflow/engine/common/extension/Extension.java index 0cda9a4..3329a61 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/IExtensionPoint.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/Extension.java @@ -3,6 +3,6 @@ /** * @author yusu */ -public interface IExtensionPoint { +public interface Extension { } diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/ExtensionInvoker.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/ExtensionInvoker.java index cc0ee3f..edae37d 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/ExtensionInvoker.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/ExtensionInvoker.java @@ -48,7 +48,7 @@ public T invoke(String extensionCode, Predicate predicate, Object... args) { return invoke(extensionCode, reduceFilter, args); } - public T invoke(String extensionCode, Class extension, Object... args) { + public T invoke(String extensionCode, Class extension, Object... args) { List extensions = ExtensionManager.getInstance().getExtensions(extensionCode); if (CollectionUtils.isEmpty(extensions)) { return null; @@ -60,7 +60,7 @@ public T invoke(String extensionCode, Class exten return (T) invoke(extensionSpec, args); } - public T invoke(String extensionCode, Class extension, + public T invoke(String extensionCode, Class extension, ReduceFilter reduceFilter, Object... args) { List extensions = ExtensionManager.getInstance().getExtensions(extensionCode); if (CollectionUtils.isEmpty(extensions)) { diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/ExtensionManager.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/ExtensionManager.java index 1daac99..ba84aad 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/ExtensionManager.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/ExtensionManager.java @@ -2,7 +2,7 @@ import com.alibaba.compileflow.engine.common.Lifecycle; import com.alibaba.compileflow.engine.common.MultiMap; -import com.alibaba.compileflow.engine.common.extension.annotation.Extension; +import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionRealization; import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionPoint; import com.alibaba.compileflow.engine.common.extension.spec.*; import com.alibaba.compileflow.engine.common.util.ClassLoaderUtils; @@ -36,8 +36,8 @@ public class ExtensionManager implements Lifecycle { private static final Logger logger = LoggerFactory.getLogger(ExtensionManager.class); - private Set> extensionPointClasses = new HashSet<>(); - private Set> extensionsClasses = new HashSet<>(); + private Set> extensionPointClasses = new HashSet<>(); + private Set> extensionsClasses = new HashSet<>(); private List extensionPointSpecs = new ArrayList<>(); private Map extensionPointSpecMap = new HashMap<>(); @@ -62,7 +62,7 @@ public List getExtensions(String extensionCode) { return extensionSpecMap.get(extensionCode); } - public List getExtensions(String extensionCode, Class extensionClass) { + public List getExtensions(String extensionCode, Class extensionClass) { List extensionSpecs = extensionSpecMap.get(extensionCode); if (CollectionUtils.isEmpty(extensionSpecs)) { return Collections.emptyList(); @@ -72,7 +72,7 @@ public List getExtensions(String extensionCode, C .map(extension -> (T) extension).collect(Collectors.toList()); } - public void registerExtensionPoint(Class extensionPointClass) { + public void registerExtensionPoint(Class extensionPointClass) { if (extensionPointClasses.contains(extensionPointClass)) { return; } @@ -95,14 +95,14 @@ public void registerExtensionPoint(Class extensionPoi extensionPointSpecMap.put(extensionPointSpec.getCode(), extensionPointSpec); } Class returnType = method.getReturnType(); - if (IExtensionPoint.class.isAssignableFrom(returnType)) { - registerExtensionPoint((Class) returnType); + if (Extension.class.isAssignableFrom(returnType)) { + registerExtensionPoint((Class) returnType); } } } - public void registerExtension(Class extensionClass) { - IExtensionPoint extension = null; + public void registerExtension(Class extensionClass) { + Extension extension = null; try { extension = ClassUtils.newInstance(extensionClass); } catch (Exception e) { @@ -119,20 +119,20 @@ public void sortExtensionsByPriority() { } } - private void registerExtension(IExtensionPoint extension) { - Class extensionClass = extension.getClass(); + private void registerExtension(Extension extension) { + Class extensionClass = extension.getClass(); if (extensionsClasses.contains(extensionClass)) { return; } - Extension extensionAnnotation = extensionClass.getAnnotation(Extension.class); - if (extensionAnnotation == null) { + ExtensionRealization extensionRealizationAnnotation = extensionClass.getAnnotation(ExtensionRealization.class); + if (extensionRealizationAnnotation == null) { return; } ExtensionPoint extensionPointAnnotation = AnnotationUtils.findAnnotation(extensionClass, ExtensionPoint.class); if (extensionPointAnnotation != null) { - ExtensionSpec extensionSpec = ClassExtensionSpec.of(extensionAnnotation, + ExtensionSpec extensionSpec = ClassExtensionSpec.of(extensionRealizationAnnotation, extensionPointAnnotation, extension); extensionSpecs.add(extensionSpec); extensionSpecMap.put(extensionSpec.getCode(), extensionSpec); @@ -142,14 +142,14 @@ private void registerExtension(IExtensionPoint extension) { for (Method method : methods) { extensionPointAnnotation = AnnotationUtils.findAnnotation(method, ExtensionPoint.class); if (extensionPointAnnotation != null) { - ExtensionSpec extensionSpec = MethodExtensionSpec.of(extensionAnnotation, + ExtensionSpec extensionSpec = MethodExtensionSpec.of(extensionRealizationAnnotation, extensionPointAnnotation, extension, method); extensionSpecs.add(extensionSpec); extensionSpecMap.put(extensionSpec.getCode(), extensionSpec); } Class returnType = method.getReturnType(); - if (IExtensionPoint.class.isAssignableFrom(returnType)) { - IExtensionPoint subExtension = null; + if (Extension.class.isAssignableFrom(returnType)) { + Extension subExtension = null; try { subExtension = MethodUtils.invoke(extension, method); } catch (Exception e) { @@ -184,14 +184,14 @@ private void loadExtensions() { return; } for (File file : files) { - Class extensionPointClass = ClassLoaderUtils.loadClass(file.getName()); + Class extensionPointClass = ClassLoaderUtils.loadClass(file.getName()); registerExtensionPoint(extensionPointClass); BufferedReader reader = new BufferedReader(new FileReader(file)); String line; while ((line = reader.readLine()) != null) { String classFullName = line.trim(); if (StringUtils.isNotBlank(classFullName)) { - Class extensionClass = ClassLoaderUtils.loadClass(classFullName); + Class extensionClass = ClassLoaderUtils.loadClass(classFullName); registerExtension(extensionClass); } } diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/Plugin.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/Plugin.java index 11395f6..340fe82 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/Plugin.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/Plugin.java @@ -60,11 +60,11 @@ public boolean isEnabled(T target) { return true; } - public List> getExtensionPointClasses() { + public List> getExtensionPointClasses() { return Collections.emptyList(); } - public List> getExtensionClasses() { + public List> getExtensionClasses() { return Collections.emptyList(); } diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/PluginManager.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/PluginManager.java index ba9572c..bde25cc 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/PluginManager.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/PluginManager.java @@ -2,7 +2,7 @@ import com.alibaba.compileflow.engine.common.DirectedGraph; import com.alibaba.compileflow.engine.common.Lifecycle; -import com.alibaba.compileflow.engine.common.extension.annotation.Extension; +import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionRealization; import com.alibaba.compileflow.engine.common.extension.annotation.PluginDependency; import com.alibaba.compileflow.engine.common.extension.annotation.PluginDependsOn; import com.alibaba.compileflow.engine.common.extension.config.PluginConfig; @@ -320,15 +320,15 @@ private void registerExtensionPointsAndExtensions() { String extensionPackage = plugin.getExtensionPackage() != null ? plugin.getExtensionPackage() : plugin.getClass().getPackage().getName(); if (extensionPackage != null) { - List> extensionClasses = PackageUtils.getAllClassInPacakge( + List> extensionClasses = PackageUtils.getAllClassInPacakge( extensionPackage) - .stream().filter(IExtensionPoint.class::isAssignableFrom) - .map(clazz -> (Class) clazz) + .stream().filter(Extension.class::isAssignableFrom) + .map(clazz -> (Class) clazz) .collect(Collectors.toList()); - for (Class extensionClass : extensionClasses) { - Extension extensionAnnotation = AnnotationUtils.findAnnotation(extensionClass, - Extension.class); - if (extensionAnnotation != null) { + for (Class extensionClass : extensionClasses) { + ExtensionRealization extensionRealizationAnnotation = AnnotationUtils.findAnnotation(extensionClass, + ExtensionRealization.class); + if (extensionRealizationAnnotation != null) { registerExtension(extensionClass); } else if (ClassUtils.isAbstractOrInterface(extensionClass)) { registerExtensionPoint(extensionClass); @@ -339,11 +339,11 @@ private void registerExtensionPointsAndExtensions() { } } - private void registerExtensionPoint(Class extensionPointClass) { + private void registerExtensionPoint(Class extensionPointClass) { ExtensionManager.getInstance().registerExtensionPoint(extensionPointClass); } - private void registerExtension(Class extensionClass) { + private void registerExtension(Class extensionClass) { ExtensionManager.getInstance().registerExtension(extensionClass); } diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/annotation/Extension.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/annotation/ExtensionRealization.java similarity index 90% rename from src/main/java/com/alibaba/compileflow/engine/common/extension/annotation/Extension.java rename to src/main/java/com/alibaba/compileflow/engine/common/extension/annotation/ExtensionRealization.java index d926e24..99fbb8d 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/annotation/Extension.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/annotation/ExtensionRealization.java @@ -11,7 +11,7 @@ */ @Retention(RUNTIME) @Target({TYPE}) -public @interface Extension { +public @interface ExtensionRealization { int priority() default 500; diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ClassExtensionPointSpec.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ClassExtensionPointSpec.java index 5828384..f236517 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ClassExtensionPointSpec.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ClassExtensionPointSpec.java @@ -1,6 +1,6 @@ package com.alibaba.compileflow.engine.common.extension.spec; -import com.alibaba.compileflow.engine.common.extension.IExtensionPoint; +import com.alibaba.compileflow.engine.common.extension.Extension; import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionPoint; /** @@ -9,7 +9,7 @@ public class ClassExtensionPointSpec extends ExtensionPointSpec { public static ClassExtensionPointSpec of(ExtensionPoint extensionPointAnnotation, - Class extensionPointClass) { + Class extensionPointClass) { ClassExtensionPointSpec extensionMethod = new ClassExtensionPointSpec(); extensionMethod.setCode(extensionPointAnnotation.code()); extensionMethod.setName(extensionPointAnnotation.name()); diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ClassExtensionSpec.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ClassExtensionSpec.java index 1d0cb8e..314d09e 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ClassExtensionSpec.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ClassExtensionSpec.java @@ -1,7 +1,7 @@ package com.alibaba.compileflow.engine.common.extension.spec; -import com.alibaba.compileflow.engine.common.extension.IExtensionPoint; -import com.alibaba.compileflow.engine.common.extension.annotation.Extension; +import com.alibaba.compileflow.engine.common.extension.Extension; +import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionRealization; import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionPoint; /** @@ -9,13 +9,13 @@ */ public class ClassExtensionSpec extends ExtensionSpec { - public static ExtensionSpec of(Extension extensionAnnotation, + public static ExtensionSpec of(ExtensionRealization extensionRealizationAnnotation, ExtensionPoint extensionPointAnnotation, - IExtensionPoint extensions) { + Extension extensions) { ExtensionSpec extensionSpec = new ClassExtensionSpec(); extensionSpec.setExtension(extensions); - extensionSpec.setScenario(extensionAnnotation.scenario()); - extensionSpec.setPriority(extensionAnnotation.priority()); + extensionSpec.setScenario(extensionRealizationAnnotation.scenario()); + extensionSpec.setPriority(extensionRealizationAnnotation.priority()); extensionSpec.setCode(extensionPointAnnotation.code()); extensionSpec.setName(extensionPointAnnotation.name()); extensionSpec.setDescription(extensionPointAnnotation.description()); diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ExtensionPointSpec.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ExtensionPointSpec.java index 5e1d4b3..8186af1 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ExtensionPointSpec.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ExtensionPointSpec.java @@ -1,6 +1,6 @@ package com.alibaba.compileflow.engine.common.extension.spec; -import com.alibaba.compileflow.engine.common.extension.IExtensionPoint; +import com.alibaba.compileflow.engine.common.extension.Extension; import com.alibaba.compileflow.engine.common.extension.constant.ReducePolicy; /** @@ -12,7 +12,7 @@ public abstract class ExtensionPointSpec extends BaseSpec { private ReducePolicy reducePolicy; - private Class extensionPointClass; + private Class extensionPointClass; public String getGroup() { return group; @@ -30,11 +30,11 @@ public void setReducePolicy(ReducePolicy reducePolicy) { this.reducePolicy = reducePolicy; } - public Class getExtensionPointClass() { + public Class getExtensionPointClass() { return extensionPointClass; } - public void setExtensionPointClass(Class extensionPointClass) { + public void setExtensionPointClass(Class extensionPointClass) { this.extensionPointClass = extensionPointClass; } diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ExtensionSpec.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ExtensionSpec.java index eec7c60..9728400 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ExtensionSpec.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/ExtensionSpec.java @@ -1,6 +1,6 @@ package com.alibaba.compileflow.engine.common.extension.spec; -import com.alibaba.compileflow.engine.common.extension.IExtensionPoint; +import com.alibaba.compileflow.engine.common.extension.Extension; import com.alibaba.compileflow.engine.common.extension.constant.ReducePolicy; /** @@ -16,7 +16,7 @@ public abstract class ExtensionSpec extends BaseSpec { private ReducePolicy reducePolicy; - private IExtensionPoint extension; + private Extension extension; public abstract boolean isCollectionFlat(); @@ -54,11 +54,11 @@ public void setReducePolicy(ReducePolicy reducePolicy) { this.reducePolicy = reducePolicy; } - public IExtensionPoint getExtension() { + public Extension getExtension() { return extension; } - public void setExtension(IExtensionPoint extension) { + public void setExtension(Extension extension) { this.extension = extension; } diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/MethodExtensionPointSpec.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/MethodExtensionPointSpec.java index 53fb143..b1f0921 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/MethodExtensionPointSpec.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/MethodExtensionPointSpec.java @@ -1,6 +1,6 @@ package com.alibaba.compileflow.engine.common.extension.spec; -import com.alibaba.compileflow.engine.common.extension.IExtensionPoint; +import com.alibaba.compileflow.engine.common.extension.Extension; import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionPoint; import java.lang.reflect.Method; @@ -13,7 +13,7 @@ public class MethodExtensionPointSpec extends ExtensionPointSpec { private Method method; public static MethodExtensionPointSpec of(ExtensionPoint extensionPointAnnotation, - Class extensionPointClass, + Class extensionPointClass, Method method) { MethodExtensionPointSpec extensionMethod = new MethodExtensionPointSpec(); extensionMethod.setCode(extensionPointAnnotation.code()); diff --git a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/MethodExtensionSpec.java b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/MethodExtensionSpec.java index 5522b30..ff51a95 100644 --- a/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/MethodExtensionSpec.java +++ b/src/main/java/com/alibaba/compileflow/engine/common/extension/spec/MethodExtensionSpec.java @@ -1,7 +1,7 @@ package com.alibaba.compileflow.engine.common.extension.spec; -import com.alibaba.compileflow.engine.common.extension.IExtensionPoint; -import com.alibaba.compileflow.engine.common.extension.annotation.Extension; +import com.alibaba.compileflow.engine.common.extension.Extension; +import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionRealization; import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionPoint; import com.alibaba.compileflow.engine.common.extension.constant.FlatType; import com.alibaba.compileflow.engine.common.extension.invoker.FastMethodInvoker; @@ -20,14 +20,14 @@ public class MethodExtensionSpec extends ExtensionSpec { private Method method; - public static MethodExtensionSpec of(Extension extensionAnnotation, + public static MethodExtensionSpec of(ExtensionRealization extensionRealizationAnnotation, ExtensionPoint extensionPointAnnotation, - IExtensionPoint extensions, + Extension extensions, Method method) { MethodExtensionSpec extensionSpec = new MethodExtensionSpec(); extensionSpec.setExtension(extensions); - extensionSpec.setScenario(extensionAnnotation.scenario()); - extensionSpec.setPriority(extensionAnnotation.priority()); + extensionSpec.setScenario(extensionRealizationAnnotation.scenario()); + extensionSpec.setPriority(extensionRealizationAnnotation.priority()); extensionSpec.setCode(extensionPointAnnotation.code()); extensionSpec.setName(extensionPointAnnotation.name()); extensionSpec.setDescription(extensionPointAnnotation.description()); diff --git a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/FlowClassLoaderFactory.java b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/FlowClassLoaderFactory.java index d161e56..4430a87 100644 --- a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/FlowClassLoaderFactory.java +++ b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/FlowClassLoaderFactory.java @@ -1,13 +1,13 @@ package com.alibaba.compileflow.engine.process.preruntime.compiler; -import com.alibaba.compileflow.engine.common.extension.IExtensionPoint; +import com.alibaba.compileflow.engine.common.extension.Extension; import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionPoint; import com.alibaba.compileflow.engine.common.extension.constant.ReducePolicy; /** * @author yusu */ -public interface FlowClassLoaderFactory extends IExtensionPoint { +public interface FlowClassLoaderFactory extends Extension { String EXT_FLOW_CLASS_LOADER_CODE = "com.alibaba.compileflow.engine.process.preruntime.compiler.FlowClassLoaderFactory.getFlowClassLoader"; diff --git a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/JavaCompiler.java b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/JavaCompiler.java index a44de33..cf85dc6 100644 --- a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/JavaCompiler.java +++ b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/JavaCompiler.java @@ -16,7 +16,7 @@ */ package com.alibaba.compileflow.engine.process.preruntime.compiler; -import com.alibaba.compileflow.engine.common.extension.IExtensionPoint; +import com.alibaba.compileflow.engine.common.extension.Extension; import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionPoint; import com.alibaba.compileflow.engine.common.extension.constant.ReducePolicy; @@ -29,7 +29,7 @@ * @author yusu */ -public interface JavaCompiler extends IExtensionPoint { +public interface JavaCompiler extends Extension { String EXT_COMPILE_CODE = "com.alibaba.compileflow.engine.process.preruntime.compiler.JavaCompiler.compile"; diff --git a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/DefaultFlowClassLoaderFactory.java b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/DefaultFlowClassLoaderFactory.java index a6b7fc8..1dcfa8c 100644 --- a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/DefaultFlowClassLoaderFactory.java +++ b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/DefaultFlowClassLoaderFactory.java @@ -16,13 +16,13 @@ */ package com.alibaba.compileflow.engine.process.preruntime.compiler.impl; -import com.alibaba.compileflow.engine.common.extension.annotation.Extension; +import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionRealization; import com.alibaba.compileflow.engine.process.preruntime.compiler.FlowClassLoaderFactory; /** * @author yusu */ -@Extension() +@ExtensionRealization() public class DefaultFlowClassLoaderFactory implements FlowClassLoaderFactory { @Override diff --git a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/support/EcJavaCompiler.java b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/support/EcJavaCompiler.java index f0792fa..3cafed8 100644 --- a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/support/EcJavaCompiler.java +++ b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/support/EcJavaCompiler.java @@ -17,7 +17,7 @@ package com.alibaba.compileflow.engine.process.preruntime.compiler.impl.support; import com.alibaba.compileflow.engine.common.CompileFlowException; -import com.alibaba.compileflow.engine.common.extension.annotation.Extension; +import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionRealization; import com.alibaba.compileflow.engine.process.preruntime.compiler.CompileOption; import com.alibaba.compileflow.engine.process.preruntime.compiler.JavaCompiler; import com.alibaba.compileflow.engine.process.preruntime.compiler.JavaSource; @@ -40,7 +40,7 @@ /** * @author yusu */ -@Extension(priority = 600) +@ExtensionRealization(priority = 600) public class EcJavaCompiler implements JavaCompiler { private static final Logger LOGGER = LoggerFactory.getLogger(EcJavaCompiler.class); diff --git a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/support/JdkJavaCompiler.java b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/support/JdkJavaCompiler.java index 6aa272c..085f203 100644 --- a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/support/JdkJavaCompiler.java +++ b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/compiler/impl/support/JdkJavaCompiler.java @@ -16,7 +16,7 @@ */ package com.alibaba.compileflow.engine.process.preruntime.compiler.impl.support; -import com.alibaba.compileflow.engine.common.extension.annotation.Extension; +import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionRealization; import com.alibaba.compileflow.engine.process.preruntime.compiler.CompileOption; import com.alibaba.compileflow.engine.process.preruntime.compiler.JavaCompiler; import com.alibaba.compileflow.engine.process.preruntime.compiler.JavaSource; @@ -37,7 +37,7 @@ /** * @author yusu */ -@Extension() +@ExtensionRealization() public class JdkJavaCompiler implements JavaCompiler { private static final Logger LOGGER = LoggerFactory.getLogger(JdkJavaCompiler.class); diff --git a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/loader/DefaultFlowSourceLoader.java b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/loader/DefaultFlowSourceLoader.java index 2bda4ef..434ec27 100644 --- a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/loader/DefaultFlowSourceLoader.java +++ b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/loader/DefaultFlowSourceLoader.java @@ -1,7 +1,7 @@ package com.alibaba.compileflow.engine.process.preruntime.loader; import com.alibaba.compileflow.engine.common.constant.FlowModelType; -import com.alibaba.compileflow.engine.common.extension.annotation.Extension; +import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionRealization; import com.alibaba.compileflow.engine.process.preruntime.converter.impl.parser.model.FlowStreamSource; import com.alibaba.compileflow.engine.process.preruntime.converter.impl.parser.model.ResourceFlowStreamSource; import com.alibaba.compileflow.engine.process.preruntime.converter.impl.parser.model.StringFlowStreamSource; @@ -10,7 +10,7 @@ /** * @author yusu */ -@Extension() +@ExtensionRealization() public class DefaultFlowSourceLoader implements FlowSourceLoader { @Override diff --git a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/loader/FlowSourceLoader.java b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/loader/FlowSourceLoader.java index dcff7a5..4ee8a9a 100644 --- a/src/main/java/com/alibaba/compileflow/engine/process/preruntime/loader/FlowSourceLoader.java +++ b/src/main/java/com/alibaba/compileflow/engine/process/preruntime/loader/FlowSourceLoader.java @@ -1,7 +1,7 @@ package com.alibaba.compileflow.engine.process.preruntime.loader; import com.alibaba.compileflow.engine.common.constant.FlowModelType; -import com.alibaba.compileflow.engine.common.extension.IExtensionPoint; +import com.alibaba.compileflow.engine.common.extension.Extension; import com.alibaba.compileflow.engine.common.extension.annotation.ExtensionPoint; import com.alibaba.compileflow.engine.common.extension.constant.ReducePolicy; import com.alibaba.compileflow.engine.process.preruntime.converter.impl.parser.model.FlowStreamSource; @@ -9,7 +9,7 @@ /** * @author yusu */ -public interface FlowSourceLoader extends IExtensionPoint { +public interface FlowSourceLoader extends Extension { String EXT_LOAD_FLOW_SOURCE_CODE = "com.alibaba.compileflow.engine.process.preruntime.loader.FlowSourceLoader.loadFlowSource";