aboutsummaryrefslogtreecommitdiff
path: root/service/processor/src/test/resources
diff options
context:
space:
mode:
authorronshapiro <ronshapiro@google.com>2018-11-01 14:11:51 -0700
committerRon Shapiro <shapiro.rd@gmail.com>2018-11-06 16:53:54 -0600
commitaf1e5daff849b4762062018b9e8bce1716bfc8b0 (patch)
treeb56d93fcccb28de6955480fce2b3c9fe8a7c86ed /service/processor/src/test/resources
parent34a6a037617102c25b8de8dbac6d2adb5fcb2c43 (diff)
downloadauto-af1e5daff849b4762062018b9e8bce1716bfc8b0.tar.gz
Separate AutoService annotations and processor
Fixes https://github.com/google/auto/issues/632 RELNOTES=`@AutoService` now has a separate artifact (`auto-service-annotations`) separate from the annotation processor (still `auto-service`) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=219696198
Diffstat (limited to 'service/processor/src/test/resources')
-rw-r--r--service/processor/src/test/resources/META-INF/services/test.AnotherService1
-rw-r--r--service/processor/src/test/resources/META-INF/services/test.AnotherServiceMulti1
-rw-r--r--service/processor/src/test/resources/META-INF/services/test.SomeService3
-rw-r--r--service/processor/src/test/resources/META-INF/services/test.SomeServiceMulti1
-rw-r--r--service/processor/src/test/resources/test/AnotherService.java18
-rw-r--r--service/processor/src/test/resources/test/AnotherServiceProvider.java21
-rw-r--r--service/processor/src/test/resources/test/Enclosing.java23
-rw-r--r--service/processor/src/test/resources/test/MultiServiceProvider.java21
-rw-r--r--service/processor/src/test/resources/test/NoServices.java21
-rw-r--r--service/processor/src/test/resources/test/SomeService.java18
-rw-r--r--service/processor/src/test/resources/test/SomeServiceProvider1.java21
-rw-r--r--service/processor/src/test/resources/test/SomeServiceProvider2.java21
12 files changed, 170 insertions, 0 deletions
diff --git a/service/processor/src/test/resources/META-INF/services/test.AnotherService b/service/processor/src/test/resources/META-INF/services/test.AnotherService
new file mode 100644
index 00000000..7453e4da
--- /dev/null
+++ b/service/processor/src/test/resources/META-INF/services/test.AnotherService
@@ -0,0 +1 @@
+test.AnotherServiceProvider
diff --git a/service/processor/src/test/resources/META-INF/services/test.AnotherServiceMulti b/service/processor/src/test/resources/META-INF/services/test.AnotherServiceMulti
new file mode 100644
index 00000000..f6ef36ac
--- /dev/null
+++ b/service/processor/src/test/resources/META-INF/services/test.AnotherServiceMulti
@@ -0,0 +1 @@
+test.MultiServiceProvider
diff --git a/service/processor/src/test/resources/META-INF/services/test.SomeService b/service/processor/src/test/resources/META-INF/services/test.SomeService
new file mode 100644
index 00000000..1b71d9db
--- /dev/null
+++ b/service/processor/src/test/resources/META-INF/services/test.SomeService
@@ -0,0 +1,3 @@
+test.Enclosing$NestedSomeServiceProvider
+test.SomeServiceProvider1
+test.SomeServiceProvider2
diff --git a/service/processor/src/test/resources/META-INF/services/test.SomeServiceMulti b/service/processor/src/test/resources/META-INF/services/test.SomeServiceMulti
new file mode 100644
index 00000000..f6ef36ac
--- /dev/null
+++ b/service/processor/src/test/resources/META-INF/services/test.SomeServiceMulti
@@ -0,0 +1 @@
+test.MultiServiceProvider
diff --git a/service/processor/src/test/resources/test/AnotherService.java b/service/processor/src/test/resources/test/AnotherService.java
new file mode 100644
index 00000000..2cbf7a6b
--- /dev/null
+++ b/service/processor/src/test/resources/test/AnotherService.java
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2008 Google, Inc.
+ *
+ * Licensed 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 test;
+
+interface AnotherService { } \ No newline at end of file
diff --git a/service/processor/src/test/resources/test/AnotherServiceProvider.java b/service/processor/src/test/resources/test/AnotherServiceProvider.java
new file mode 100644
index 00000000..b425c0ed
--- /dev/null
+++ b/service/processor/src/test/resources/test/AnotherServiceProvider.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2008 Google, Inc.
+ *
+ * Licensed 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 test;
+
+import com.google.auto.service.AutoService;
+
+@AutoService(AnotherService.class)
+public class AnotherServiceProvider implements AnotherService { } \ No newline at end of file
diff --git a/service/processor/src/test/resources/test/Enclosing.java b/service/processor/src/test/resources/test/Enclosing.java
new file mode 100644
index 00000000..5176a7ee
--- /dev/null
+++ b/service/processor/src/test/resources/test/Enclosing.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2008 Google, Inc.
+ *
+ * Licensed 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 test;
+
+import com.google.auto.service.AutoService;
+
+public class Enclosing {
+ @AutoService(SomeService.class)
+ public static class NestedSomeServiceProvider implements SomeService { }
+} \ No newline at end of file
diff --git a/service/processor/src/test/resources/test/MultiServiceProvider.java b/service/processor/src/test/resources/test/MultiServiceProvider.java
new file mode 100644
index 00000000..804904bf
--- /dev/null
+++ b/service/processor/src/test/resources/test/MultiServiceProvider.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2017 Google, Inc.
+ *
+ * Licensed 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 test;
+
+import com.google.auto.service.AutoService;
+
+@AutoService({SomeService.class, AnotherService.class})
+public class MultiServiceProvider implements SomeService, AnotherService {}
diff --git a/service/processor/src/test/resources/test/NoServices.java b/service/processor/src/test/resources/test/NoServices.java
new file mode 100644
index 00000000..3687eb55
--- /dev/null
+++ b/service/processor/src/test/resources/test/NoServices.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2008 Google, Inc.
+ *
+ * Licensed 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 test;
+
+import com.google.auto.service.AutoService;
+
+@AutoService({})
+public class NoServices {}
diff --git a/service/processor/src/test/resources/test/SomeService.java b/service/processor/src/test/resources/test/SomeService.java
new file mode 100644
index 00000000..5a4a3888
--- /dev/null
+++ b/service/processor/src/test/resources/test/SomeService.java
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2008 Google, Inc.
+ *
+ * Licensed 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 test;
+
+interface SomeService { } \ No newline at end of file
diff --git a/service/processor/src/test/resources/test/SomeServiceProvider1.java b/service/processor/src/test/resources/test/SomeServiceProvider1.java
new file mode 100644
index 00000000..1a1a5e8f
--- /dev/null
+++ b/service/processor/src/test/resources/test/SomeServiceProvider1.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2008 Google, Inc.
+ *
+ * Licensed 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 test;
+
+import com.google.auto.service.AutoService;
+
+@AutoService(SomeService.class)
+public class SomeServiceProvider1 implements SomeService { } \ No newline at end of file
diff --git a/service/processor/src/test/resources/test/SomeServiceProvider2.java b/service/processor/src/test/resources/test/SomeServiceProvider2.java
new file mode 100644
index 00000000..fb6a1bd3
--- /dev/null
+++ b/service/processor/src/test/resources/test/SomeServiceProvider2.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2008 Google, Inc.
+ *
+ * Licensed 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 test;
+
+import com.google.auto.service.AutoService;
+
+@AutoService(SomeService.class)
+public class SomeServiceProvider2 implements SomeService { } \ No newline at end of file