1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. Oracle designates this 9 * particular file as subject to the "Classpath" exception as provided 10 * by Oracle in the LICENSE file that accompanied this code. 11 * 12 * This code is distributed in the hope that it will be useful, but WITHOUT 13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 * version 2 for more details (a copy is included in the LICENSE file that 16 * accompanied this code). 17 * 18 * You should have received a copy of the GNU General Public License version 19 * 2 along with this work; if not, write to the Free Software Foundation, 20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21 * 22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 23 * or visit www.oracle.com if you need additional information or have any 24 * questions. 25 */ 26 27 package java.lang; 28 29 import android.compat.annotation.UnsupportedAppUsage; 30 31 @SuppressWarnings({"unchecked", "deprecation", "all"}) 32 public abstract class Enum<E extends java.lang.Enum<E>> 33 implements java.lang.Comparable<E>, java.io.Serializable { 34 Enum(java.lang.String name, int ordinal)35 protected Enum(java.lang.String name, int ordinal) { 36 throw new RuntimeException("Stub!"); 37 } 38 name()39 public final java.lang.String name() { 40 throw new RuntimeException("Stub!"); 41 } 42 ordinal()43 public final int ordinal() { 44 throw new RuntimeException("Stub!"); 45 } 46 toString()47 public java.lang.String toString() { 48 throw new RuntimeException("Stub!"); 49 } 50 equals(java.lang.Object other)51 public final boolean equals(java.lang.Object other) { 52 throw new RuntimeException("Stub!"); 53 } 54 hashCode()55 public final int hashCode() { 56 throw new RuntimeException("Stub!"); 57 } 58 clone()59 protected final java.lang.Object clone() throws java.lang.CloneNotSupportedException { 60 throw new RuntimeException("Stub!"); 61 } 62 compareTo(E o)63 public final int compareTo(E o) { 64 throw new RuntimeException("Stub!"); 65 } 66 getDeclaringClass()67 public final java.lang.Class<E> getDeclaringClass() { 68 throw new RuntimeException("Stub!"); 69 } 70 valueOf( java.lang.Class<T> enumType, java.lang.String name)71 public static <T extends java.lang.Enum<T>> T valueOf( 72 java.lang.Class<T> enumType, java.lang.String name) { 73 throw new RuntimeException("Stub!"); 74 } 75 enumValues(java.lang.Class<? extends java.lang.Enum> clazz)76 private static java.lang.Object[] enumValues(java.lang.Class<? extends java.lang.Enum> clazz) { 77 throw new RuntimeException("Stub!"); 78 } 79 80 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) getSharedConstants( java.lang.Class<T> enumType)81 public static <T extends java.lang.Enum<T>> T[] getSharedConstants( 82 java.lang.Class<T> enumType) { 83 throw new RuntimeException("Stub!"); 84 } 85 finalize()86 protected final void finalize() { 87 throw new RuntimeException("Stub!"); 88 } 89 readObject(java.io.ObjectInputStream in)90 private void readObject(java.io.ObjectInputStream in) 91 throws java.lang.ClassNotFoundException, java.io.IOException { 92 throw new RuntimeException("Stub!"); 93 } 94 readObjectNoData()95 private void readObjectNoData() throws java.io.ObjectStreamException { 96 throw new RuntimeException("Stub!"); 97 } 98 99 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) 100 private final java.lang.String name; 101 102 { 103 name = null; 104 } 105 106 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) 107 private final int ordinal; 108 109 { 110 ordinal = 0; 111 } 112 113 private static final libcore.util.BasicLruCache< 114 java.lang.Class<? extends java.lang.Enum>, java.lang.Object[]> 115 sharedConstantsCache; 116 117 static { 118 sharedConstantsCache = null; 119 } 120 } 121