diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:28:47 -0800 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:28:47 -0800 |
| commit | f6c387128427e121477c1b32ad35cdcaa5101ba3 (patch) | |
| tree | 2aa25fa8c8c3a9caeecf98fd8ac4cd9b12717997 /tests/068-classloader/src-ex | |
| parent | f72d5de56a522ac3be03873bdde26f23a5eeeb3c (diff) | |
| download | android_dalvik-f6c387128427e121477c1b32ad35cdcaa5101ba3.tar.gz android_dalvik-f6c387128427e121477c1b32ad35cdcaa5101ba3.tar.bz2 android_dalvik-f6c387128427e121477c1b32ad35cdcaa5101ba3.zip | |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'tests/068-classloader/src-ex')
| -rw-r--r-- | tests/068-classloader/src-ex/DoubledExtend.java | 21 | ||||
| -rw-r--r-- | tests/068-classloader/src-ex/DoubledImplement.java | 19 | ||||
| -rw-r--r-- | tests/068-classloader/src-ex/DoubledImplement2.java | 33 | ||||
| -rw-r--r-- | tests/068-classloader/src-ex/IfaceImpl.java | 22 | ||||
| -rw-r--r-- | tests/068-classloader/src-ex/IfaceSub.java | 20 | ||||
| -rw-r--r-- | tests/068-classloader/src-ex/Inaccessible1.java | 12 | ||||
| -rw-r--r-- | tests/068-classloader/src-ex/Inaccessible2.java | 11 | ||||
| -rw-r--r-- | tests/068-classloader/src-ex/Inaccessible3.java | 11 |
8 files changed, 149 insertions, 0 deletions
diff --git a/tests/068-classloader/src-ex/DoubledExtend.java b/tests/068-classloader/src-ex/DoubledExtend.java new file mode 100644 index 000000000..17da2c28c --- /dev/null +++ b/tests/068-classloader/src-ex/DoubledExtend.java @@ -0,0 +1,21 @@ +// Copyright 2008 The Android Open Source Project + +/** + * Doubled sub-class, form #2. + */ +public class DoubledExtend extends Base { + public DoubledExtend() { + //System.out.println("Ctor: doubled extend, type 2"); + } + + @Override + public DoubledExtend getExtended() { + //System.out.println("getExtended 2"); + return new DoubledExtend(); + } + + public String getStr() { + return "DoubledExtend 2"; + } +} + diff --git a/tests/068-classloader/src-ex/DoubledImplement.java b/tests/068-classloader/src-ex/DoubledImplement.java new file mode 100644 index 000000000..b479d8fc2 --- /dev/null +++ b/tests/068-classloader/src-ex/DoubledImplement.java @@ -0,0 +1,19 @@ +// Copyright 2008 The Android Open Source Project + +/** + * Doubled sub-class, form #2. + */ +public class DoubledImplement implements ICommon { + public DoubledImplement() { + System.out.println("Ctor: doubled implement, type 2"); + } + + public DoubledImplement getDoubledInstance() { + return new DoubledImplement(); + } + + public void two() { + System.out.println("DoubledImplement two"); + } +} + diff --git a/tests/068-classloader/src-ex/DoubledImplement2.java b/tests/068-classloader/src-ex/DoubledImplement2.java new file mode 100644 index 000000000..60e820f63 --- /dev/null +++ b/tests/068-classloader/src-ex/DoubledImplement2.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2008 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. + */ + +/** + * Another doubled sub-class, form #2. + */ +public class DoubledImplement2 implements ICommon2 { + public DoubledImplement2() { + System.out.println("Ctor: doubled implement, type 2"); + } + + public DoubledImplement2 getDoubledInstance2() { + return new DoubledImplement2(); + } + + public void two() { + System.out.println("DoubledImplement2 two"); + } +} + diff --git a/tests/068-classloader/src-ex/IfaceImpl.java b/tests/068-classloader/src-ex/IfaceImpl.java new file mode 100644 index 000000000..94a3bb0c1 --- /dev/null +++ b/tests/068-classloader/src-ex/IfaceImpl.java @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2008 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. + */ + +public class IfaceImpl implements IfaceSub { + public DoubledImplement2 getDoubledInstance2() { + return new DoubledImplement2(); + } +} + diff --git a/tests/068-classloader/src-ex/IfaceSub.java b/tests/068-classloader/src-ex/IfaceSub.java new file mode 100644 index 000000000..cb932bbcd --- /dev/null +++ b/tests/068-classloader/src-ex/IfaceSub.java @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2008 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. + */ + +public interface IfaceSub extends IfaceSuper { + public DoubledImplement2 getDoubledInstance2(); +} + diff --git a/tests/068-classloader/src-ex/Inaccessible1.java b/tests/068-classloader/src-ex/Inaccessible1.java new file mode 100644 index 000000000..7b28427ec --- /dev/null +++ b/tests/068-classloader/src-ex/Inaccessible1.java @@ -0,0 +1,12 @@ +// Copyright 2008 The Android Open Source Project + +/** + * Non-public class, inaccessible from Main. Note the constructor is + * public. + */ +class Inaccessible1 extends SimpleBase { + public Inaccessible1() { + System.out.println("--- inaccessible1"); + } +} + diff --git a/tests/068-classloader/src-ex/Inaccessible2.java b/tests/068-classloader/src-ex/Inaccessible2.java new file mode 100644 index 000000000..b612bfa9b --- /dev/null +++ b/tests/068-classloader/src-ex/Inaccessible2.java @@ -0,0 +1,11 @@ +// Copyright 2008 The Android Open Source Project + +/** + * Public class that can't access its base. + */ +public class Inaccessible2 extends InaccessibleBase { + public Inaccessible2() { + System.out.println("--- inaccessible2"); + } +} + diff --git a/tests/068-classloader/src-ex/Inaccessible3.java b/tests/068-classloader/src-ex/Inaccessible3.java new file mode 100644 index 000000000..75a01be1b --- /dev/null +++ b/tests/068-classloader/src-ex/Inaccessible3.java @@ -0,0 +1,11 @@ +// Copyright 2008 The Android Open Source Project + +/** + * Public class that can't access its interface. + */ +public class Inaccessible3 implements InaccessibleInterface { + public Inaccessible3() { + System.out.println("--- inaccessible3"); + } +} + |
