Loading tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenKeptInImpl.java 0 → 100644 +35 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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.hoststubgen.hosthelper; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation injected to all classes/methods/fields that are kept in the "impl" jar. */ @Target({TYPE, METHOD, CONSTRUCTOR, FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface HostStubGenKeptInImpl { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenKeptInImpl.class); String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; } tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenKeptInStub.java 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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.hoststubgen.hosthelper; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation injected to all classes/methods/fields that are kept in the "stub" jar. * * All items in the stub jar are automatically kept in the impl jar as well, so * the items with this annotation will all have {@link HostStubGenKeptInImpl} too. */ @Target({TYPE, METHOD, CONSTRUCTOR, FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface HostStubGenKeptInStub { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenKeptInStub.class); String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; } tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedKeepClass.java→tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsIgnore.java +7 −5 Original line number Diff line number Diff line Loading @@ -15,18 +15,20 @@ */ package com.android.hoststubgen.hosthelper; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.ElementType.METHOD; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation added to all "stub" classes generated by HostStubGen. * Annotation injected to all methods processed as "ignore". * * (This annotation is only added in the impl jar, but not the stub jar) */ @Target({TYPE}) @Target({METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface HostStubGenProcessedKeepClass { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedKeepClass.class); public @interface HostStubGenProcessedAsIgnore { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsIgnore.class); String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; } tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsSubstitute.java 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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.hoststubgen.hosthelper; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation injected to all methods that are processed as "substitute". * * (This annotation is only added in the impl jar, but not the stub jar) */ @Target({TYPE, METHOD, CONSTRUCTOR, FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface HostStubGenProcessedAsSubstitute { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName( HostStubGenProcessedAsSubstitute.class); String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; } tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedStubClass.java→tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsThrow.java +7 −5 Original line number Diff line number Diff line Loading @@ -15,18 +15,20 @@ */ package com.android.hoststubgen.hosthelper; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.ElementType.METHOD; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation added to all "stub" classes generated by HostStubGen. * Annotation injected to all methods that are processed as "throw". * * (This annotation is only added in the impl jar, but not the stub jar) */ @Target({TYPE}) @Target({METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface HostStubGenProcessedStubClass { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedStubClass.class); public @interface HostStubGenProcessedAsThrow { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsThrow.class); String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; } Loading
tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenKeptInImpl.java 0 → 100644 +35 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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.hoststubgen.hosthelper; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation injected to all classes/methods/fields that are kept in the "impl" jar. */ @Target({TYPE, METHOD, CONSTRUCTOR, FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface HostStubGenKeptInImpl { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenKeptInImpl.class); String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; }
tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenKeptInStub.java 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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.hoststubgen.hosthelper; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation injected to all classes/methods/fields that are kept in the "stub" jar. * * All items in the stub jar are automatically kept in the impl jar as well, so * the items with this annotation will all have {@link HostStubGenKeptInImpl} too. */ @Target({TYPE, METHOD, CONSTRUCTOR, FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface HostStubGenKeptInStub { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenKeptInStub.class); String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; }
tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedKeepClass.java→tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsIgnore.java +7 −5 Original line number Diff line number Diff line Loading @@ -15,18 +15,20 @@ */ package com.android.hoststubgen.hosthelper; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.ElementType.METHOD; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation added to all "stub" classes generated by HostStubGen. * Annotation injected to all methods processed as "ignore". * * (This annotation is only added in the impl jar, but not the stub jar) */ @Target({TYPE}) @Target({METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface HostStubGenProcessedKeepClass { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedKeepClass.class); public @interface HostStubGenProcessedAsIgnore { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsIgnore.class); String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; }
tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsSubstitute.java 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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.hoststubgen.hosthelper; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation injected to all methods that are processed as "substitute". * * (This annotation is only added in the impl jar, but not the stub jar) */ @Target({TYPE, METHOD, CONSTRUCTOR, FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface HostStubGenProcessedAsSubstitute { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName( HostStubGenProcessedAsSubstitute.class); String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; }
tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedStubClass.java→tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsThrow.java +7 −5 Original line number Diff line number Diff line Loading @@ -15,18 +15,20 @@ */ package com.android.hoststubgen.hosthelper; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.ElementType.METHOD; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation added to all "stub" classes generated by HostStubGen. * Annotation injected to all methods that are processed as "throw". * * (This annotation is only added in the impl jar, but not the stub jar) */ @Target({TYPE}) @Target({METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface HostStubGenProcessedStubClass { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedStubClass.class); public @interface HostStubGenProcessedAsThrow { String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsThrow.class); String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; }