1 /*
2  * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.  Oracle designates this
8  * particular file as subject to the "Classpath" exception as provided
9  * by Oracle in the LICENSE file that accompanied this code.
10  *
11  * This code is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14  * version 2 for more details (a copy is included in the LICENSE file that
15  * accompanied this code).
16  *
17  * You should have received a copy of the GNU General Public License version
18  * 2 along with this work; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22  * or visit www.oracle.com if you need additional information or have any
23  * questions.
24  */
25 
26 package sun.util.calendar;
27 
28 @SuppressWarnings({"unchecked", "deprecation", "all"})
29 public abstract class BaseCalendar extends sun.util.calendar.AbstractCalendar {
30 
BaseCalendar()31     public BaseCalendar() {
32         throw new RuntimeException("Stub!");
33     }
34 
validate(sun.util.calendar.CalendarDate date)35     public boolean validate(sun.util.calendar.CalendarDate date) {
36         throw new RuntimeException("Stub!");
37     }
38 
normalize(sun.util.calendar.CalendarDate date)39     public boolean normalize(sun.util.calendar.CalendarDate date) {
40         throw new RuntimeException("Stub!");
41     }
42 
normalizeMonth(sun.util.calendar.CalendarDate date)43     void normalizeMonth(sun.util.calendar.CalendarDate date) {
44         throw new RuntimeException("Stub!");
45     }
46 
getYearLength(sun.util.calendar.CalendarDate date)47     public int getYearLength(sun.util.calendar.CalendarDate date) {
48         throw new RuntimeException("Stub!");
49     }
50 
getYearLengthInMonths(sun.util.calendar.CalendarDate date)51     public int getYearLengthInMonths(sun.util.calendar.CalendarDate date) {
52         throw new RuntimeException("Stub!");
53     }
54 
getMonthLength(sun.util.calendar.CalendarDate date)55     public int getMonthLength(sun.util.calendar.CalendarDate date) {
56         throw new RuntimeException("Stub!");
57     }
58 
getMonthLength(int year, int month)59     private int getMonthLength(int year, int month) {
60         throw new RuntimeException("Stub!");
61     }
62 
getDayOfYear(sun.util.calendar.CalendarDate date)63     public long getDayOfYear(sun.util.calendar.CalendarDate date) {
64         throw new RuntimeException("Stub!");
65     }
66 
getDayOfYear(int year, int month, int dayOfMonth)67     final long getDayOfYear(int year, int month, int dayOfMonth) {
68         throw new RuntimeException("Stub!");
69     }
70 
getFixedDate(sun.util.calendar.CalendarDate date)71     public long getFixedDate(sun.util.calendar.CalendarDate date) {
72         throw new RuntimeException("Stub!");
73     }
74 
getFixedDate( int year, int month, int dayOfMonth, sun.util.calendar.BaseCalendar.Date cache)75     public long getFixedDate(
76             int year, int month, int dayOfMonth, sun.util.calendar.BaseCalendar.Date cache) {
77         throw new RuntimeException("Stub!");
78     }
79 
getCalendarDateFromFixedDate(sun.util.calendar.CalendarDate date, long fixedDate)80     public void getCalendarDateFromFixedDate(sun.util.calendar.CalendarDate date, long fixedDate) {
81         throw new RuntimeException("Stub!");
82     }
83 
getDayOfWeek(sun.util.calendar.CalendarDate date)84     public int getDayOfWeek(sun.util.calendar.CalendarDate date) {
85         throw new RuntimeException("Stub!");
86     }
87 
getDayOfWeekFromFixedDate(long fixedDate)88     public static final int getDayOfWeekFromFixedDate(long fixedDate) {
89         throw new RuntimeException("Stub!");
90     }
91 
getYearFromFixedDate(long fixedDate)92     public int getYearFromFixedDate(long fixedDate) {
93         throw new RuntimeException("Stub!");
94     }
95 
getGregorianYearFromFixedDate(long fixedDate)96     final int getGregorianYearFromFixedDate(long fixedDate) {
97         throw new RuntimeException("Stub!");
98     }
99 
isLeapYear(sun.util.calendar.CalendarDate date)100     protected boolean isLeapYear(sun.util.calendar.CalendarDate date) {
101         throw new RuntimeException("Stub!");
102     }
103 
isLeapYear(int normalizedYear)104     boolean isLeapYear(int normalizedYear) {
105         throw new RuntimeException("Stub!");
106     }
107 
108     static final int[] ACCUMULATED_DAYS_IN_MONTH;
109 
110     static {
111         ACCUMULATED_DAYS_IN_MONTH = new int[0];
112     }
113 
114     static final int[] ACCUMULATED_DAYS_IN_MONTH_LEAP;
115 
116     static {
117         ACCUMULATED_DAYS_IN_MONTH_LEAP = new int[0];
118     }
119 
120     public static final int APRIL = 4; // 0x4
121 
122     public static final int AUGUST = 8; // 0x8
123 
124     private static final int BASE_YEAR = 1970; // 0x7b2
125 
126     static final int[] DAYS_IN_MONTH;
127 
128     static {
129         DAYS_IN_MONTH = new int[0];
130     }
131 
132     public static final int DECEMBER = 12; // 0xc
133 
134     public static final int FEBRUARY = 2; // 0x2
135 
136     private static final int[] FIXED_DATES;
137 
138     static {
139         FIXED_DATES = new int[0];
140     }
141 
142     public static final int FRIDAY = 6; // 0x6
143 
144     public static final int JANUARY = 1; // 0x1
145 
146     public static final int JULY = 7; // 0x7
147 
148     public static final int JUNE = 6; // 0x6
149 
150     public static final int MARCH = 3; // 0x3
151 
152     public static final int MAY = 5; // 0x5
153 
154     public static final int MONDAY = 2; // 0x2
155 
156     public static final int NOVEMBER = 11; // 0xb
157 
158     public static final int OCTOBER = 10; // 0xa
159 
160     public static final int SATURDAY = 7; // 0x7
161 
162     public static final int SEPTEMBER = 9; // 0x9
163 
164     public static final int SUNDAY = 1; // 0x1
165 
166     public static final int THURSDAY = 5; // 0x5
167 
168     public static final int TUESDAY = 3; // 0x3
169 
170     public static final int WEDNESDAY = 4; // 0x4
171 
172     @SuppressWarnings({"unchecked", "deprecation", "all"})
173     public abstract static class Date extends sun.util.calendar.CalendarDate {
174 
Date()175         protected Date() {
176             throw new RuntimeException("Stub!");
177         }
178 
Date(java.util.TimeZone zone)179         protected Date(java.util.TimeZone zone) {
180             throw new RuntimeException("Stub!");
181         }
182 
setNormalizedDate( int normalizedYear, int month, int dayOfMonth)183         public sun.util.calendar.BaseCalendar.Date setNormalizedDate(
184                 int normalizedYear, int month, int dayOfMonth) {
185             throw new RuntimeException("Stub!");
186         }
187 
188         @android.compat.annotation.UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
getNormalizedYear()189         public abstract int getNormalizedYear();
190 
191         @android.compat.annotation.UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
setNormalizedYear(int normalizedYear)192         public abstract void setNormalizedYear(int normalizedYear);
193 
hit(int year)194         protected final boolean hit(int year) {
195             throw new RuntimeException("Stub!");
196         }
197 
hit(long fixedDate)198         protected final boolean hit(long fixedDate) {
199             throw new RuntimeException("Stub!");
200         }
201 
getCachedYear()202         protected int getCachedYear() {
203             throw new RuntimeException("Stub!");
204         }
205 
getCachedJan1()206         protected long getCachedJan1() {
207             throw new RuntimeException("Stub!");
208         }
209 
setCache(int year, long jan1, int len)210         protected void setCache(int year, long jan1, int len) {
211             throw new RuntimeException("Stub!");
212         }
213 
214         long cachedFixedDateJan1 = 731581L; // 0xb29bdL
215 
216         long cachedFixedDateNextJan1;
217 
218         int cachedYear = 2004; // 0x7d4
219     }
220 }
221