diff options
author | Yohann Roussel <yroussel@google.com> | 2014-08-13 17:18:20 +0200 |
---|---|---|
committer | Benoit Lamarche <benoitlamarche@google.com> | 2014-08-27 11:44:25 +0200 |
commit | a152d5e98e4dab1b94b1a87d6d6625a2aa6f96de (patch) | |
tree | 1fb70b6954e021686b446ee48c1b79df9523cca4 /jack-tests | |
parent | b6faafdfbff933ef5cf323a13266af277d81b8c6 (diff) | |
download | toolchain_jack-a152d5e98e4dab1b94b1a87d6d6625a2aa6f96de.zip toolchain_jack-a152d5e98e4dab1b94b1a87d6d6625a2aa6f96de.tar.gz toolchain_jack-a152d5e98e4dab1b94b1a87d6d6625a2aa6f96de.tar.bz2 |
Add initial annotation adder support.
Supports only a reduced set of the syntax sufficient for providing multidex
tracing configuration.
Change-Id: Ibebadbf548f4efe6f5d5e147dad171e887308d6b
Diffstat (limited to 'jack-tests')
9 files changed, 231 insertions, 0 deletions
diff --git a/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Activity.java b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Activity.java new file mode 100644 index 0000000..9094de6 --- /dev/null +++ b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Activity.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * 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 com.android.jack.annotationadder.test001.jack; + +public interface Activity { + +} diff --git a/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Application.java b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Application.java new file mode 100644 index 0000000..475d8db --- /dev/null +++ b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Application.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * 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 com.android.jack.annotationadder.test001.jack; + +public class Application { + +} diff --git a/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Context.java b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Context.java new file mode 100644 index 0000000..2b930da --- /dev/null +++ b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Context.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * 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 com.android.jack.annotationadder.test001.jack; + +public class Context { + +} diff --git a/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Instrumentation.java b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Instrumentation.java new file mode 100644 index 0000000..edcf7cd --- /dev/null +++ b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/Instrumentation.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * 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 com.android.jack.annotationadder.test001.jack; + +public class Instrumentation { + +} diff --git a/jack-tests/tests/com/android/jack/annotationadder/test001/jack/MultiDexInstaller.java b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/MultiDexInstaller.java new file mode 100644 index 0000000..75f9c7e --- /dev/null +++ b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/MultiDexInstaller.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * 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 com.android.jack.annotationadder.test001.jack; + +public @interface MultiDexInstaller { + +} diff --git a/jack-tests/tests/com/android/jack/annotationadder/test001/jack/app1/ApplicationActivity1.java b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/app1/ApplicationActivity1.java new file mode 100644 index 0000000..c306c28 --- /dev/null +++ b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/app1/ApplicationActivity1.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * 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 com.android.jack.annotationadder.test001.jack.app1; + +import com.android.jack.annotationadder.test001.jack.Activity; +import com.android.jack.annotationadder.test001.jack.Application; +import com.android.jack.annotationadder.test001.jack.Context; + +public class ApplicationActivity1 extends Application implements Activity { + + public ApplicationActivity1() { + } + + public void attachBaseContext(Context context) { + + } + + public void noAnnotation(Context context) { + + } + +} diff --git a/jack-tests/tests/com/android/jack/annotationadder/test001/jack/app1/NoAnnotation.java b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/app1/NoAnnotation.java new file mode 100644 index 0000000..bf65e0b --- /dev/null +++ b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/app1/NoAnnotation.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * 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 com.android.jack.annotationadder.test001.jack.app1; + +import com.android.jack.annotationadder.test001.jack.Context; + +public class NoAnnotation { + public NoAnnotation() { + } + + public void attachBaseContext(Context context) { + + } + +} diff --git a/jack-tests/tests/com/android/jack/annotationadder/test001/jack/app1/NoAnnotationInterface.java b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/app1/NoAnnotationInterface.java new file mode 100644 index 0000000..ea62d15 --- /dev/null +++ b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/app1/NoAnnotationInterface.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * 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 com.android.jack.annotationadder.test001.jack.app1; + +import com.android.jack.annotationadder.test001.jack.Context; + +public interface NoAnnotationInterface { + + public void attachBaseContext(Context context); + +} diff --git a/jack-tests/tests/com/android/jack/annotationadder/test001/jack/config.jpp b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/config.jpp new file mode 100644 index 0000000..249148e --- /dev/null +++ b/jack-tests/tests/com/android/jack/annotationadder/test001/jack/config.jpp @@ -0,0 +1,36 @@ +test001: + @@com.android.jack.annotationadder.test001.jack.MultiDexInstaller + class * + modifiers { + public | private + } + extends { + class com.android.jack.annotationadder.test001.jack.Instrumentation + | class com.android.jack.annotationadder.test001.jack.Activity + | class com.android.jack.annotationadder.test001.jack.Service + | class com.android.jack.annotationadder.test001.jack.ContentProvider + | class com.android.jack.annotationadder.test001.jack.BroadcastReceiver + | class com.android.jack.annotationadder.test001.jack.BackupAgent + | class com.android.jack.annotationadder.test001.jack.Application + } + annotate { + @@com.android.jack.annotationadder.test001.jack.MultiDexInstaller + method * <init>(); + } + +test002: + class * + modifiers { + public + } + extends { + class com.android.jack.annotationadder.test001.jack.Application + } + annotate { + @@com.android.jack.annotationadder.test001.jack.MultiDexInstaller + method void attachBaseContext(class com.android.jack.annotationadder.test001.jack.Context) + modifiers { + public + } + ; + } |