1 /* 2 * Copyright (C) 2009 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 public class Base { 18 public void declaredInBase() { 19 System.out.println("declaredInBase: Base"); 20 } 21 22 public void overridden() { 23 System.out.println("overridden: Base"); 24 } 25 26 /* src2: removed */ 27 public void wasOverridden() { 28 System.out.println("wasOverridden: Base"); 29 } 30 31 public void callOverrideWithPublic() { 32 overrideWithPublic(); 33 } 34 public void overrideWithPublic() { 35 System.out.println("overrideWithPublic: Base"); 36 } 37 38 public void callOverridePublicWithProtected() { 39 overridePublicWithProtected(); 40 } 41 /* src2: public */ 42 protected void overridePublicWithProtected() { 43 System.out.println("overridePublicWithProtected: Base"); 44 } 45 46 public void callOverrideProtectedWithPublic() { 47 overrideProtectedWithPublic(); 48 } 49 protected void overrideProtectedWithPublic() { 50 System.out.println("overrideProtectedWithPublic: Base"); 51 } 52 53 public void callOverridePublicWithPrivate() { 54 overridePublicWithPrivate(); 55 } 56 /* src2: public */ 57 private void overridePublicWithPrivate() { 58 System.out.println("overridePublicWithPrivate: Base"); 59 } 60 61 public void callOverridePrivateWithPublic() { 62 overridePrivateWithPublic(); 63 } 64 private void overridePrivateWithPublic() { 65 System.out.println("overridePrivateWithPublic: Base"); 66 } 67 68 public void callOverrideVirtualWithStatic() { 69 overrideVirtualWithStatic(); 70 } 71 /* src2: non-static */ 72 public static void overrideVirtualWithStatic() { 73 System.out.println("overrideVirtualWithStatic: Base"); 74 } 75 76 public void callOverrideStaticWithVirtual() { 77 overrideStaticWithVirtual(); 78 } 79 /* src2: static */ 80 public void overrideStaticWithVirtual() { 81 System.out.println("overrideStaticWithVirtual: Base"); 82 } 83 } 84