index int64 0 0 | repo_id stringlengths 9 205 | file_path stringlengths 31 246 | content stringlengths 1 12.2M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/compatible | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/compatible/impl/CompatibleExtImpl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.compatible.impl;
import org.apache.dubbo.common.Extension;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.compatible.CompatibleExt;
@Extension("impl1")
public class CompatibleExtImpl1 implements CompatibleExt {
public String echo(URL url, String s) {
return "Ext1Impl1-echo";
}
public String yell(URL url, String s) {
return "Ext1Impl1-yell";
}
public String bang(URL url, int i) {
return "bang1";
}
}
| 6,300 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext1/SimpleExt.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext1;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.SPI;
/**
* Simple extension, has no wrapper
*/
@SPI("impl1")
public interface SimpleExt {
// @Adaptive example, do not specify a explicit key.
@Adaptive
String echo(URL url, String s);
@Adaptive({"key1", "key2"})
String yell(URL url, String s);
// no @Adaptive
String bang(URL url, int i);
}
| 6,301 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext1 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext1/impl/SimpleExtImpl3.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext1.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext1.SimpleExt;
public class SimpleExtImpl3 implements SimpleExt {
public String echo(URL url, String s) {
return "Ext1Impl3-echo";
}
public String yell(URL url, String s) {
return "Ext1Impl3-yell";
}
public String bang(URL url, int i) {
return "bang3";
}
}
| 6,302 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext1 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext1/impl/SimpleExtImpl2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext1.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext1.SimpleExt;
public class SimpleExtImpl2 implements SimpleExt {
public String echo(URL url, String s) {
return "Ext1Impl2-echo";
}
public String yell(URL url, String s) {
return "Ext1Impl2-yell";
}
public String bang(URL url, int i) {
return "bang2";
}
}
| 6,303 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext1 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext1/impl/SimpleExtImpl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext1.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext1.SimpleExt;
public class SimpleExtImpl1 implements SimpleExt {
public String echo(URL url, String s) {
return "Ext1Impl1-echo";
}
public String yell(URL url, String s) {
return "Ext1Impl1-yell";
}
public String bang(URL url, int i) {
return "bang1";
}
}
| 6,304 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext7/InitErrorExt.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext7;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.SPI;
/**
* Test scenario for DUBBO-144: extension load failure when third-party dependency doesn't exist. If extension is not
* referenced/used, do not report error in load time (instead, report issue when it gets used)
*/
@SPI
public interface InitErrorExt {
@Adaptive
String echo(URL url, String s);
}
| 6,305 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext7 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext7/impl/Ext7InitErrorImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext7.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext7.InitErrorExt;
public class Ext7InitErrorImpl implements InitErrorExt {
static {
if (true) {
throw new RuntimeException("intended!");
}
}
public String echo(URL url, String s) {
return "";
}
}
| 6,306 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext7 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext7/impl/Ext7Impl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext7.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext7.InitErrorExt;
public class Ext7Impl implements InitErrorExt {
public String echo(URL url, String s) {
return "";
}
}
| 6,307 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/wrapper/WrapperTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.wrapper;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.extension.wrapper.impl.DemoWrapper;
import org.apache.dubbo.common.extension.wrapper.impl.DemoWrapper2;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* {@link org.apache.dubbo.common.extension.Wrapper} Test
*
* @since 2.7.5
*/
class WrapperTest {
@Test
void testWrapper() {
Demo demoWrapper = ExtensionLoader.getExtensionLoader(Demo.class).getExtension("demo");
assertTrue(demoWrapper instanceof DemoWrapper);
Demo demoWrapper2 = ExtensionLoader.getExtensionLoader(Demo.class).getExtension("demo2");
assertTrue(demoWrapper2 instanceof DemoWrapper2);
}
}
| 6,308 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/wrapper/Demo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.wrapper;
import org.apache.dubbo.common.extension.SPI;
@SPI("demo")
public interface Demo {
String echo(String msg);
}
| 6,309 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/wrapper | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/wrapper/impl/DemoWrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.wrapper.impl;
import org.apache.dubbo.common.extension.Wrapper;
import org.apache.dubbo.common.extension.wrapper.Demo;
@Wrapper(
matches = {"demo"},
mismatches = "demo2")
public class DemoWrapper implements Demo {
private Demo demo;
public DemoWrapper(Demo demo) {
this.demo = demo;
}
public String echo(String msg) {
return demo.echo(msg);
}
}
| 6,310 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/wrapper | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/wrapper/impl/DemoWrapper2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.wrapper.impl;
import org.apache.dubbo.common.extension.Wrapper;
import org.apache.dubbo.common.extension.wrapper.Demo;
@Wrapper(
matches = {"demo2"},
mismatches = {"demo"})
public class DemoWrapper2 implements Demo {
private Demo demo;
public DemoWrapper2(Demo demo) {
this.demo = demo;
}
public String echo(String msg) {
return demo.echo(msg);
}
}
| 6,311 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/wrapper | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/wrapper/impl/DemoImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.wrapper.impl;
import org.apache.dubbo.common.extension.wrapper.Demo;
public class DemoImpl implements Demo {
@Override
public String echo(String msg) {
return msg;
}
public DemoImpl() {}
public DemoImpl(String test) {}
}
| 6,312 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/FooFrameworkProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionScope;
import org.apache.dubbo.common.extension.SPI;
@SPI(scope = ExtensionScope.FRAMEWORK)
public interface FooFrameworkProvider {
@Adaptive
void process(URL url);
}
| 6,313 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/FooAppService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionScope;
import org.apache.dubbo.common.extension.SPI;
@SPI(scope = ExtensionScope.APPLICATION)
public interface FooAppService {
@Adaptive
void process(URL url);
}
| 6,314 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/FooAppProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionScope;
import org.apache.dubbo.common.extension.SPI;
@SPI(scope = ExtensionScope.APPLICATION)
public interface FooAppProvider {
@Adaptive
void process(URL url);
}
| 6,315 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/FooModuleService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionScope;
import org.apache.dubbo.common.extension.SPI;
@SPI(scope = ExtensionScope.MODULE)
public interface FooModuleService {
@Adaptive
void process(URL url);
}
| 6,316 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/FooFrameworkService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionScope;
import org.apache.dubbo.common.extension.SPI;
@SPI(scope = ExtensionScope.FRAMEWORK)
public interface FooFrameworkService {
@Adaptive
void process(URL url);
}
| 6,317 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/FooModuleProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionScope;
import org.apache.dubbo.common.extension.SPI;
@SPI(scope = ExtensionScope.MODULE)
public interface FooModuleProvider {
@Adaptive
void process(URL url);
}
| 6,318 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/impl/TestAppProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.director.FooAppProvider;
public class TestAppProvider implements FooAppProvider {
@Override
public void process(URL url) {}
}
| 6,319 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/impl/TestModuleProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.director.FooModuleProvider;
public class TestModuleProvider implements FooModuleProvider {
public void process(URL url) {}
}
| 6,320 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/impl/TestFrameworkProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.director.FooFrameworkProvider;
public class TestFrameworkProvider implements FooFrameworkProvider {
@Override
public void process(URL url) {}
}
| 6,321 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/impl/TestFrameworkService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.director.FooAppProvider;
import org.apache.dubbo.common.extension.director.FooFrameworkProvider;
import org.apache.dubbo.common.extension.director.FooFrameworkService;
import org.apache.dubbo.common.extension.director.FooModuleProvider;
public class TestFrameworkService extends BaseTestService implements FooFrameworkService {
private FooFrameworkProvider frameworkProvider;
private FooAppProvider appProvider;
private FooModuleProvider moduleProvider;
public FooFrameworkProvider getFrameworkProvider() {
return frameworkProvider;
}
public void setFrameworkProvider(FooFrameworkProvider frameworkProvider) {
this.frameworkProvider = frameworkProvider;
}
public FooAppProvider getAppProvider() {
return appProvider;
}
public void setAppProvider(FooAppProvider appProvider) {
this.appProvider = appProvider;
}
public FooModuleProvider getModuleProvider() {
return moduleProvider;
}
public void setModuleProvider(FooModuleProvider moduleProvider) {
this.moduleProvider = moduleProvider;
}
@Override
public void process(URL url) {}
}
| 6,322 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/impl/TestAppService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.director.FooAppProvider;
import org.apache.dubbo.common.extension.director.FooAppService;
import org.apache.dubbo.common.extension.director.FooFrameworkProvider;
import org.apache.dubbo.common.extension.director.FooFrameworkService;
import org.apache.dubbo.common.extension.director.FooModuleProvider;
public class TestAppService extends BaseTestService implements FooAppService {
private FooFrameworkService frameworkService;
private FooFrameworkProvider frameworkProvider;
private FooAppProvider appProvider;
private FooModuleProvider moduleProvider;
public FooFrameworkService getFrameworkService() {
return frameworkService;
}
public void setFrameworkService(FooFrameworkService frameworkService) {
this.frameworkService = frameworkService;
}
public FooAppProvider getAppProvider() {
return appProvider;
}
public void setAppProvider(FooAppProvider appProvider) {
this.appProvider = appProvider;
}
public FooModuleProvider getModuleProvider() {
return moduleProvider;
}
public void setModuleProvider(FooModuleProvider moduleProvider) {
this.moduleProvider = moduleProvider;
}
public FooFrameworkProvider getFrameworkProvider() {
return frameworkProvider;
}
public void setFrameworkProvider(FooFrameworkProvider frameworkProvider) {
this.frameworkProvider = frameworkProvider;
}
@Override
public void process(URL url) {}
}
| 6,323 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/impl/TestModuleService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.director.FooAppProvider;
import org.apache.dubbo.common.extension.director.FooAppService;
import org.apache.dubbo.common.extension.director.FooFrameworkProvider;
import org.apache.dubbo.common.extension.director.FooFrameworkService;
import org.apache.dubbo.common.extension.director.FooModuleProvider;
import org.apache.dubbo.common.extension.director.FooModuleService;
public class TestModuleService extends BaseTestService implements FooModuleService {
private FooFrameworkService frameworkService;
private FooFrameworkProvider frameworkProvider;
private FooAppService appService;
private FooAppProvider appProvider;
private FooModuleProvider moduleProvider;
public FooFrameworkService getFrameworkService() {
return frameworkService;
}
public void setFrameworkService(FooFrameworkService frameworkService) {
this.frameworkService = frameworkService;
}
public FooAppProvider getAppProvider() {
return appProvider;
}
public void setAppProvider(FooAppProvider appProvider) {
this.appProvider = appProvider;
}
public FooModuleProvider getModuleProvider() {
return moduleProvider;
}
public void setModuleProvider(FooModuleProvider moduleProvider) {
this.moduleProvider = moduleProvider;
}
public FooFrameworkProvider getFrameworkProvider() {
return frameworkProvider;
}
public void setFrameworkProvider(FooFrameworkProvider frameworkProvider) {
this.frameworkProvider = frameworkProvider;
}
public FooAppService getAppService() {
return appService;
}
public void setAppService(FooAppService appService) {
this.appService = appService;
}
@Override
public void process(URL url) {}
}
| 6,324 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/impl/BaseTestService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director.impl;
import org.apache.dubbo.common.resource.Disposable;
import org.apache.dubbo.rpc.model.ApplicationModel;
import org.apache.dubbo.rpc.model.FrameworkModel;
import org.apache.dubbo.rpc.model.ModuleModel;
import org.apache.dubbo.rpc.model.ScopeModelAware;
public class BaseTestService implements ScopeModelAware, Disposable {
private FrameworkModel frameworkModel;
private ApplicationModel applicationModel;
private ModuleModel moduleModel;
private volatile boolean destroyed;
@Override
public void setFrameworkModel(FrameworkModel frameworkModel) {
this.frameworkModel = frameworkModel;
}
@Override
public void setApplicationModel(ApplicationModel applicationModel) {
this.applicationModel = applicationModel;
}
@Override
public void setModuleModel(ModuleModel moduleModel) {
this.moduleModel = moduleModel;
}
public FrameworkModel getFrameworkModel() {
return frameworkModel;
}
public ApplicationModel getApplicationModel() {
return applicationModel;
}
public ModuleModel getModuleModel() {
return moduleModel;
}
@Override
public void destroy() {
this.destroyed = true;
}
public boolean isDestroyed() {
return destroyed;
}
}
| 6,325 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/inject/AdaptiveExtensionInjectorTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.inject;
import org.apache.dubbo.common.beans.ScopeBeanExtensionInjector;
import org.apache.dubbo.common.beans.factory.ScopeBeanFactory;
import org.apache.dubbo.common.extension.ExtensionInjector;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.extension.director.FooFrameworkProvider;
import org.apache.dubbo.rpc.model.FrameworkModel;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
/**
* {@link AdaptiveExtensionInjector}
* {@link ScopeBeanExtensionInjector}
* {@link SpiExtensionInjector}
*/
class AdaptiveExtensionInjectorTest {
@Test
void test() {
FrameworkModel frameworkModel = new FrameworkModel();
ExtensionLoader<ExtensionInjector> extensionLoader = frameworkModel.getExtensionLoader(ExtensionInjector.class);
ExtensionInjector adaptiveExtensionInjector = extensionLoader.getAdaptiveExtension();
ExtensionInjector scopeExtensionInjector = extensionLoader.getExtension("scopeBean");
ExtensionInjector spiExtensionInjector = extensionLoader.getExtension("spi");
FooFrameworkProvider testFrameworkProvider =
adaptiveExtensionInjector.getInstance(FooFrameworkProvider.class, "testFrameworkProvider");
Assertions.assertNotNull(testFrameworkProvider);
Assertions.assertTrue(testFrameworkProvider.getClass().getName().endsWith("$Adaptive"));
Assertions.assertEquals(
spiExtensionInjector.getInstance(FooFrameworkProvider.class, "testFrameworkProvider"),
testFrameworkProvider);
ScopeBeanFactory beanFactory = frameworkModel.getBeanFactory();
AdaptiveExtensionInjectorTest obj = new AdaptiveExtensionInjectorTest();
beanFactory.registerBean("bean", obj);
AdaptiveExtensionInjectorTest bean =
adaptiveExtensionInjector.getInstance(AdaptiveExtensionInjectorTest.class, "bean");
Assertions.assertEquals(bean, obj);
Assertions.assertEquals(scopeExtensionInjector.getInstance(AdaptiveExtensionInjectorTest.class, "bean"), bean);
frameworkModel.destroy();
}
}
| 6,326 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap/WrappedExt.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_wrap;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.SPI;
/**
* No Adaptive Method!!
*/
@SPI("impl1")
public interface WrappedExt {
String echo(URL url, String s);
}
| 6,327 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap/WrappedExtWrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_wrap;
public interface WrappedExtWrapper {
WrappedExt getOrigin();
}
| 6,328 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap/impl/Ext6Impl3.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_wrap.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExt;
public class Ext6Impl3 implements WrappedExt {
@Override
public String echo(URL url, String s) {
return "Ext6Impl3-echo";
}
}
| 6,329 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap/impl/Ext6Impl2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_wrap.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExt;
public class Ext6Impl2 implements WrappedExt {
public String echo(URL url, String s) {
return "Ext6Impl2-echo";
}
}
| 6,330 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap/impl/Ext6Wrapper1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_wrap.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Wrapper;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExt;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExtWrapper;
import java.util.concurrent.atomic.AtomicInteger;
@Wrapper(matches = {"impl1", "impl2"})
public class Ext6Wrapper1 implements WrappedExt, WrappedExtWrapper {
public static AtomicInteger echoCount = new AtomicInteger();
WrappedExt origin;
public Ext6Wrapper1(WrappedExt origin) {
this.origin = origin;
}
public String echo(URL url, String s) {
echoCount.incrementAndGet();
return origin.echo(url, s);
}
@Override
public WrappedExt getOrigin() {
return origin;
}
}
| 6,331 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap/impl/Ext6Impl4.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_wrap.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExt;
public class Ext6Impl4 implements WrappedExt {
@Override
public String echo(URL url, String s) {
return "Ext6Impl4-echo";
}
}
| 6,332 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap/impl/Ext6Wrapper3.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_wrap.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Wrapper;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExt;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExtWrapper;
import java.util.concurrent.atomic.AtomicInteger;
@Wrapper(
matches = {"impl3"},
order = 3)
public class Ext6Wrapper3 implements WrappedExt, WrappedExtWrapper {
public static AtomicInteger echoCount = new AtomicInteger();
WrappedExt origin;
public Ext6Wrapper3(WrappedExt origin) {
this.origin = origin;
}
public String echo(URL url, String s) {
echoCount.incrementAndGet();
return origin.echo(url, s);
}
public WrappedExt getOrigin() {
return origin;
}
}
| 6,333 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap/impl/Ext6Wrapper2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_wrap.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Wrapper;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExt;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExtWrapper;
import java.util.concurrent.atomic.AtomicInteger;
@Wrapper(mismatches = {"impl3", "impl4"})
public class Ext6Wrapper2 implements WrappedExt, WrappedExtWrapper {
public static AtomicInteger echoCount = new AtomicInteger();
WrappedExt origin;
public Ext6Wrapper2(WrappedExt origin) {
this.origin = origin;
}
public String echo(URL url, String s) {
echoCount.incrementAndGet();
return origin.echo(url, s);
}
public WrappedExt getOrigin() {
return origin;
}
}
| 6,334 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap/impl/Ext6Impl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_wrap.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExt;
public class Ext6Impl1 implements WrappedExt {
public String echo(URL url, String s) {
return "Ext6Impl1-echo";
}
}
| 6,335 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_wrap/impl/Ext6Wrapper4.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_wrap.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Wrapper;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExt;
import org.apache.dubbo.common.extension.ext6_wrap.WrappedExtWrapper;
import java.util.concurrent.atomic.AtomicInteger;
@Wrapper(
mismatches = {"impl1", "impl2"},
order = 4)
public class Ext6Wrapper4 implements WrappedExt, WrappedExtWrapper {
public static AtomicInteger echoCount = new AtomicInteger();
WrappedExt origin;
public Ext6Wrapper4(WrappedExt origin) {
this.origin = origin;
}
public String echo(URL url, String s) {
echoCount.incrementAndGet();
return origin.echo(url, s);
}
public WrappedExt getOrigin() {
return origin;
}
}
| 6,336 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated/DuplicatedWithoutOverriddenExt.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.duplicated;
import org.apache.dubbo.common.extension.SPI;
/**
* This is an interface for testing duplicated extension
* see issue: https://github.com/apache/dubbo/issues/3575
*/
@SPI
public interface DuplicatedWithoutOverriddenExt {
String echo();
}
| 6,337 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated/DuplicatedOverriddenExt.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.duplicated;
import org.apache.dubbo.common.extension.SPI;
/**
* This is an interface for testing duplicated extension
*/
@SPI
public interface DuplicatedOverriddenExt {
String echo();
}
| 6,338 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated/impl/DuplicatedOverriddenExt2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.duplicated.impl;
import org.apache.dubbo.common.extension.duplicated.DuplicatedOverriddenExt;
public class DuplicatedOverriddenExt2 implements DuplicatedOverriddenExt {
@Override
public String echo() {
return "DuplicatedOverriddenExt2";
}
}
| 6,339 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated/impl/DuplicatedWithoutOverriddenExt2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.duplicated.impl;
import org.apache.dubbo.common.extension.duplicated.DuplicatedWithoutOverriddenExt;
public class DuplicatedWithoutOverriddenExt2 implements DuplicatedWithoutOverriddenExt {
@Override
public String echo() {
return "DuplicatedWithoutOverriddenExt2";
}
}
| 6,340 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated/impl/DuplicatedWithoutOverriddenExt1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.duplicated.impl;
import org.apache.dubbo.common.extension.duplicated.DuplicatedWithoutOverriddenExt;
public class DuplicatedWithoutOverriddenExt1 implements DuplicatedWithoutOverriddenExt {
@Override
public String echo() {
return "DuplicatedWithoutOverriddenExt1";
}
}
| 6,341 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated/impl/DuplicatedOverriddenExt1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.duplicated.impl;
import org.apache.dubbo.common.extension.duplicated.DuplicatedOverriddenExt;
public class DuplicatedOverriddenExt1 implements DuplicatedOverriddenExt {
@Override
public String echo() {
return "DuplicatedOverriddenExt1";
}
}
| 6,342 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext2/Ext2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext2;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.SPI;
/**
* Has no default
*/
@SPI
public interface Ext2 {
// one of the properties of an argument is an instance of URL.
@Adaptive
String echo(UrlHolder holder, String s);
String bang(URL url, int i);
}
| 6,343 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext2/UrlHolder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext2;
import org.apache.dubbo.common.URL;
public class UrlHolder {
private Double Num;
private URL url;
private String name;
private int age;
public Double getNum() {
return Num;
}
public void setNum(Double num) {
Num = num;
}
public URL getUrl() {
return url;
}
public void setUrl(URL url) {
this.url = url;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
| 6,344 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext2 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext2/impl/Ext2Impl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext2.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext2.Ext2;
import org.apache.dubbo.common.extension.ext2.UrlHolder;
public class Ext2Impl1 implements Ext2 {
public String echo(UrlHolder holder, String s) {
return "Ext2Impl1-echo";
}
public String bang(URL url, int i) {
return "bang1";
}
}
| 6,345 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext2 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext2/impl/Ext2Impl2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext2.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext2.Ext2;
import org.apache.dubbo.common.extension.ext2.UrlHolder;
public class Ext2Impl2 implements Ext2 {
public String echo(UrlHolder holder, String s) {
return "Ext2Impl2-echo";
}
public String bang(URL url, int i) {
return "bang2";
}
}
| 6,346 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext2 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext2/impl/Ext2Impl3.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext2.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext2.Ext2;
import org.apache.dubbo.common.extension.ext2.UrlHolder;
public class Ext2Impl3 implements Ext2 {
public String echo(UrlHolder holder, String s) {
return "Ext2Impl3-echo";
}
public String bang(URL url, int i) {
return "bang3";
}
}
| 6,347 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext5/NoAdaptiveMethodExt.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext5;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.SPI;
/**
* No Adaptive Method!!
*/
@SPI("impl1")
public interface NoAdaptiveMethodExt {
String echo(URL url, String s);
}
| 6,348 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext5 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext5/impl/Ext5Impl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext5.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext5.NoAdaptiveMethodExt;
public class Ext5Impl1 implements NoAdaptiveMethodExt {
public String echo(URL url, String s) {
return "Ext5Impl1-echo";
}
}
| 6,349 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext5 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext5/impl/Ext5Impl2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext5.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext5.NoAdaptiveMethodExt;
public class Ext5Impl2 implements NoAdaptiveMethodExt {
public String echo(URL url, String s) {
return "Ext5Impl2-echo";
}
}
| 6,350 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext9_empty/Ext9Empty.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext9_empty;
import org.apache.dubbo.common.extension.SPI;
@SPI
public interface Ext9Empty {
void empty();
}
| 6,351 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext9_empty | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext9_empty/impl/Ext9EmptyImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext9_empty.impl;
import org.apache.dubbo.common.extension.ext9_empty.Ext9Empty;
public class Ext9EmptyImpl implements Ext9Empty {
@Override
public void empty() {}
}
| 6,352 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext4/NoUrlParamExt.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext4;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.SPI;
import java.util.List;
@SPI("impl1")
public interface NoUrlParamExt {
// method has no URL parameter
@Adaptive
String bark(String name, List<Object> list);
}
| 6,353 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext4 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext4/impl/Ext4Impl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext4.impl;
import org.apache.dubbo.common.extension.ext4.NoUrlParamExt;
import java.util.List;
public class Ext4Impl1 implements NoUrlParamExt {
public String bark(String name, List<Object> list) {
return null;
}
}
| 6,354 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext4 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext4/impl/Ext4Impl2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext4.impl;
import org.apache.dubbo.common.extension.ext4.NoUrlParamExt;
import java.util.List;
public class Ext4Impl2 implements NoUrlParamExt {
public String bark(String name, List<Object> list) {
return null;
}
}
| 6,355 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext3/UseProtocolKeyExt.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext3;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.SPI;
@SPI("impl1")
public interface UseProtocolKeyExt {
// protocol key is the second
@Adaptive({"key1", "protocol"})
String echo(URL url, String s);
// protocol key is the first
@Adaptive({"protocol", "key2"})
String yell(URL url, String s);
}
| 6,356 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext3 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext3/impl/UseProtocolKeyExtImpl2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext3.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext3.UseProtocolKeyExt;
public class UseProtocolKeyExtImpl2 implements UseProtocolKeyExt {
public String echo(URL url, String s) {
return "Ext3Impl2-echo";
}
public String yell(URL url, String s) {
return "Ext3Impl2-yell";
}
}
| 6,357 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext3 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext3/impl/UseProtocolKeyExtImpl3.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext3.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext3.UseProtocolKeyExt;
public class UseProtocolKeyExtImpl3 implements UseProtocolKeyExt {
public String echo(URL url, String s) {
return "Ext3Impl3-echo";
}
public String yell(URL url, String s) {
return "Ext3Impl3-yell";
}
}
| 6,358 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext3 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext3/impl/UseProtocolKeyExtImpl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext3.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext3.UseProtocolKeyExt;
public class UseProtocolKeyExtImpl1 implements UseProtocolKeyExt {
public String echo(URL url, String s) {
return "Ext3Impl1-echo";
}
public String yell(URL url, String s) {
return "Ext3Impl1-yell";
}
}
| 6,359 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/injection/InjectExt.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.injection;
import org.apache.dubbo.common.extension.SPI;
/**
*
*/
@SPI("injection")
public interface InjectExt {
String echo(String msg);
}
| 6,360 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/injection | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/injection/impl/InjectExtImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.injection.impl;
import org.apache.dubbo.common.extension.DisableInject;
import org.apache.dubbo.common.extension.ext1.SimpleExt;
import org.apache.dubbo.common.extension.injection.InjectExt;
import org.apache.dubbo.common.extension.wrapper.Demo;
public class InjectExtImpl implements InjectExt {
private SimpleExt simpleExt;
private SimpleExt simpleExt1;
private Object genericType;
private Demo demo;
public void setSimpleExt(SimpleExt simpleExt) {
this.simpleExt = simpleExt;
}
@DisableInject
public void setSimpleExt1(SimpleExt simpleExt1) {
this.simpleExt1 = simpleExt1;
}
public void setGenericType(Object genericType) {
this.genericType = genericType;
}
@Override
public String echo(String msg) {
return null;
}
public SimpleExt getSimpleExt() {
return simpleExt;
}
public SimpleExt getSimpleExt1() {
return simpleExt1;
}
public Object getGenericType() {
return genericType;
}
public Demo getDemo() {
return demo;
}
public void setDemo(Demo demo) {
this.demo = demo;
}
}
| 6,361 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/support/Order0Filter1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.support;
import org.apache.dubbo.common.extension.Activate;
@Activate
public class Order0Filter1 implements Order0Filter0 {}
| 6,362 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/support/Filter1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.support;
import org.apache.dubbo.common.extension.Activate;
@Activate
public class Filter1 implements Filter0 {}
| 6,363 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/support/Filter0.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.support;
import org.apache.dubbo.common.extension.SPI;
@SPI
public interface Filter0 {}
| 6,364 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/support/Order0Filter0.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.support;
import org.apache.dubbo.common.extension.SPI;
@SPI
public interface Order0Filter0 {}
| 6,365 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/support/ActivateComparatorTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.support;
import org.apache.dubbo.rpc.model.ApplicationModel;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
class ActivateComparatorTest {
private ActivateComparator activateComparator;
@BeforeEach
public void setup() {
activateComparator =
new ActivateComparator(ApplicationModel.defaultModel().getExtensionDirector());
}
@Test
void testActivateComparator() {
Filter1 f1 = new Filter1();
Filter2 f2 = new Filter2();
Filter3 f3 = new Filter3();
Filter4 f4 = new Filter4();
List<Class<?>> filters = new ArrayList<>();
filters.add(f1.getClass());
filters.add(f2.getClass());
filters.add(f3.getClass());
filters.add(f4.getClass());
Collections.sort(filters, activateComparator);
Assertions.assertEquals(f4.getClass(), filters.get(0));
Assertions.assertEquals(f3.getClass(), filters.get(1));
Assertions.assertEquals(f2.getClass(), filters.get(2));
Assertions.assertEquals(f1.getClass(), filters.get(3));
}
@Test
void testFilterOrder() {
Order0Filter1 order0Filter1 = new Order0Filter1();
Order0Filter2 order0Filter2 = new Order0Filter2();
List<Class<?>> filters = null;
{
filters = new ArrayList<>();
filters.add(order0Filter1.getClass());
filters.add(order0Filter2.getClass());
filters.sort(activateComparator);
Assertions.assertEquals(order0Filter1.getClass(), filters.get(0));
Assertions.assertEquals(order0Filter2.getClass(), filters.get(1));
}
{
filters = new ArrayList<>();
filters.add(order0Filter2.getClass());
filters.add(order0Filter1.getClass());
filters.sort(activateComparator);
Assertions.assertEquals(order0Filter1.getClass(), filters.get(0));
Assertions.assertEquals(order0Filter2.getClass(), filters.get(1));
}
}
}
| 6,366 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/support/Filter3.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.support;
import org.apache.dubbo.common.extension.Activate;
@Activate(after = "_4")
public class Filter3 implements Filter0 {}
| 6,367 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/support/Filter2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.support;
import org.apache.dubbo.common.extension.Activate;
@Activate(before = "_1")
public class Filter2 implements Filter0 {}
| 6,368 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/support/Order0Filter2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.support;
import org.apache.dubbo.common.extension.Activate;
@Activate
public class Order0Filter2 implements Order0Filter0 {}
| 6,369 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/support/Filter4.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.support;
import org.apache.dubbo.common.extension.Activate;
@Activate(before = "_2")
public class Filter4 implements Filter0 {}
| 6,370 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext10_multi_names/Ext10MultiNames.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext10_multi_names;
import org.apache.dubbo.common.extension.SPI;
@SPI
public interface Ext10MultiNames {}
| 6,371 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext10_multi_names | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext10_multi_names/impl/Ext10MultiNamesImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext10_multi_names.impl;
import org.apache.dubbo.common.extension.ext10_multi_names.Ext10MultiNames;
public class Ext10MultiNamesImpl implements Ext10MultiNames {}
| 6,372 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_inject/Dao.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_inject;
public interface Dao {
void update();
}
| 6,373 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_inject/Ext6.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_inject;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.SPI;
/**
* No default
*/
@SPI
public interface Ext6 {
@Adaptive
String echo(URL url, String s);
}
| 6,374 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_inject | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_inject/impl/Ext6Impl2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_inject.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext6_inject.Ext6;
import java.util.List;
public class Ext6Impl2 implements Ext6 {
List<String> list;
public List<String> getList() {
return list;
}
public void setList(List<String> list) {
this.list = list;
}
public String echo(URL url, String s) {
throw new UnsupportedOperationException();
}
}
| 6,375 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_inject | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_inject/impl/DaoImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_inject.impl;
import org.apache.dubbo.common.extension.ext6_inject.Dao;
public class DaoImpl implements Dao {
public void update() {}
}
| 6,376 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_inject | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_inject/impl/Ext6Impl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext6_inject.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext1.SimpleExt;
import org.apache.dubbo.common.extension.ext6_inject.Dao;
import org.apache.dubbo.common.extension.ext6_inject.Ext6;
import org.junit.jupiter.api.Assertions;
public class Ext6Impl1 implements Ext6 {
public Dao obj;
SimpleExt ext1;
public void setDao(Dao obj) {
Assertions.assertNotNull(obj, "inject extension instance can not be null");
Assertions.fail();
}
public void setExt1(SimpleExt ext1) {
this.ext1 = ext1;
}
public String echo(URL url, String s) {
return "Ext6Impl1-echo-" + ext1.echo(url, s);
}
}
| 6,377 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate/ActivateWrapperExt1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.activate;
import org.apache.dubbo.common.extension.SPI;
@SPI("extImp1")
public interface ActivateWrapperExt1 {
String echo(String msg);
}
| 6,378 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate/ActivateExt1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.activate;
import org.apache.dubbo.common.extension.SPI;
@SPI("impl1")
public interface ActivateExt1 {
String echo(String msg);
}
| 6,379 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate/impl/ValueActivateExtImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.activate.impl;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.extension.activate.ActivateExt1;
@Activate(
value = {"value"},
group = {"value"})
public class ValueActivateExtImpl implements ActivateExt1 {
public String echo(String msg) {
return msg;
}
}
| 6,380 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate/impl/GroupActivateExtImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.activate.impl;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.extension.activate.ActivateExt1;
@Activate(group = {"group1", "group2"})
public class GroupActivateExtImpl implements ActivateExt1 {
public String echo(String msg) {
return msg;
}
}
| 6,381 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate/impl/ActivateWrapperExt1Impl2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.activate.impl;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.extension.activate.ActivateWrapperExt1;
@Activate(
order = 2,
group = {"order"})
public class ActivateWrapperExt1Impl2 implements ActivateWrapperExt1 {
public String echo(String msg) {
return msg;
}
}
| 6,382 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate/impl/OrderActivateExtImpl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.activate.impl;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.extension.activate.ActivateExt1;
@Activate(
order = 2,
group = {"order"})
public class OrderActivateExtImpl1 implements ActivateExt1 {
public String echo(String msg) {
return msg;
}
}
| 6,383 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate/impl/ActivateExt1Impl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.activate.impl;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.extension.activate.ActivateExt1;
@Activate(
order = 1,
group = {"default_group"})
public class ActivateExt1Impl1 implements ActivateExt1 {
public String echo(String msg) {
return msg;
}
}
| 6,384 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate/impl/ActivateWrapperExt1Wrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.activate.impl;
import org.apache.dubbo.common.extension.activate.ActivateWrapperExt1;
public class ActivateWrapperExt1Wrapper implements ActivateWrapperExt1 {
private ActivateWrapperExt1 activateWrapperExt1;
public ActivateWrapperExt1Wrapper(ActivateWrapperExt1 activateWrapperExt1) {
this.activateWrapperExt1 = activateWrapperExt1;
}
@Override
public String echo(String msg) {
return activateWrapperExt1.echo(msg);
}
}
| 6,385 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate/impl/ActivateOnClassExt1Impl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.activate.impl;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.extension.activate.ActivateExt1;
@Activate(
group = {"onClass"},
onClass = "org.springframework.security.core.context.SecurityContextHolder")
public class ActivateOnClassExt1Impl implements ActivateExt1 {
@Override
public String echo(String msg) {
return null;
}
}
| 6,386 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate/impl/OrderActivateExtImpl2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.activate.impl;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.extension.activate.ActivateExt1;
@Activate(
order = 100,
group = {"order"})
public class OrderActivateExtImpl2 implements ActivateExt1 {
public String echo(String msg) {
return msg;
}
}
| 6,387 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/activate/impl/ActivateWrapperExt1Impl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.activate.impl;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.extension.activate.ActivateWrapperExt1;
@Activate(
order = 1,
group = {"order"})
public class ActivateWrapperExt1Impl1 implements ActivateWrapperExt1 {
public String echo(String msg) {
return msg;
}
}
| 6,388 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/AddExt4.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext8_add;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.SPI;
/**
* show add extension pragmatically. use for test replaceAdaptive fail
*/
@SPI("impl1")
public interface AddExt4 {
@Adaptive
String echo(URL url, String s);
}
| 6,389 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/AddExt3.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext8_add;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.SPI;
/**
* show add extension pragmatically. use for test replaceAdaptive success
*/
@SPI("impl1")
public interface AddExt3 {
@Adaptive
String echo(URL url, String s);
}
| 6,390 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/AddExt2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext8_add;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.SPI;
/**
* show add extension pragmatically. use for test addAdaptive successful
*/
@SPI("impl1")
public interface AddExt2 {
@Adaptive
String echo(URL url, String s);
}
| 6,391 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/AddExt1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext8_add;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.SPI;
/**
* show add extension pragmatically
*/
@SPI("impl1")
public interface AddExt1 {
@Adaptive
String echo(URL url, String s);
}
| 6,392 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/impl/AddExt4_ManualAdaptive.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext8_add.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.extension.ext8_add.AddExt4;
@Adaptive
public class AddExt4_ManualAdaptive implements AddExt4 {
public String echo(URL url, String s) {
AddExt4 addExt1 = ExtensionLoader.getExtensionLoader(AddExt4.class).getExtension(url.getParameter("add.ext4"));
return addExt1.echo(url, s);
}
}
| 6,393 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/impl/AddExt1_ManualAdaptive.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext8_add.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.extension.ext8_add.AddExt1;
@Adaptive
public class AddExt1_ManualAdaptive implements AddExt1 {
public String echo(URL url, String s) {
AddExt1 addExt1 = ExtensionLoader.getExtensionLoader(AddExt1.class).getExtension(url.getParameter("add.ext1"));
return addExt1.echo(url, s);
}
}
| 6,394 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/impl/AddExt2_ManualAdaptive.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext8_add.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.extension.ext8_add.AddExt2;
@Adaptive
public class AddExt2_ManualAdaptive implements AddExt2 {
public String echo(URL url, String s) {
AddExt2 addExt1 = ExtensionLoader.getExtensionLoader(AddExt2.class).getExtension(url.getParameter("add.ext2"));
return addExt1.echo(url, s);
}
}
| 6,395 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/impl/AddExt1Impl1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext8_add.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext8_add.AddExt1;
public class AddExt1Impl1 implements AddExt1 {
public String echo(URL url, String s) {
return this.getClass().getSimpleName();
}
}
| 6,396 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/impl/AddExt3_ManualAdaptive.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext8_add.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.extension.ext8_add.AddExt3;
@Adaptive
public class AddExt3_ManualAdaptive implements AddExt3 {
public String echo(URL url, String s) {
AddExt3 addExt1 = ExtensionLoader.getExtensionLoader(AddExt3.class).getExtension(url.getParameter("add.ext3"));
return addExt1.echo(url, s);
}
}
| 6,397 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/impl/AddExt1_ManualAdd1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext8_add.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext8_add.AddExt1;
public class AddExt1_ManualAdd1 implements AddExt1 {
public String echo(URL url, String s) {
return this.getClass().getSimpleName();
}
}
| 6,398 |
0 | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add | Create_ds/dubbo/dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/impl/AddExt1_ManualAdd2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.ext8_add.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ext8_add.AddExt1;
public class AddExt1_ManualAdd2 implements AddExt1 {
public String echo(URL url, String s) {
return this.getClass().getSimpleName();
}
}
| 6,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.