1 /*
2 * MIT License
3 * Copyright (c) 2006-2025 JMockit developers
4 * See LICENSE file for full license text.
5 */
6 package mockit.asm.classes;
7
8 import edu.umd.cs.findbugs.annotations.NonNull;
9 import edu.umd.cs.findbugs.annotations.Nullable;
10
11 /**
12 * Holds additional information about a classfile: {@link #signature}, {@link #superName}, {@link #interfaces},
13 * {@link #hostClassName}.
14 */
15 public final class ClassInfo {
16 private static final String[] NO_INTERFACES = {};
17
18 /**
19 * The internal names of the class's interfaces, if any.
20 */
21 @NonNull
22 public String[] interfaces = NO_INTERFACES;
23
24 /**
25 * The internal name of the super class. For interfaces, the super class is {@link Object}. Is <code>null</code>
26 * only for the {@link Object} class.
27 */
28 @Nullable
29 public String superName;
30
31 /**
32 * The generic signature of the class. Is <code>null</code> when the class is not a generic one, and does not extend
33 * or implement generic classes or interfaces.
34 */
35 @Nullable
36 public String signature;
37
38 /**
39 * The name of the source file from which the class was compiled, if available.
40 */
41 @Nullable
42 public String sourceFileName;
43
44 /**
45 * The internal name of the host class, if the class is part of a nest (Java 11+ only).
46 */
47 @Nullable
48 String hostClassName;
49
50 /**
51 * The names of the classes that are members of the nest defined by the nest host class, if any (Java 11+ only).
52 */
53 @Nullable
54 String[] nestMembers;
55 }