MCPcopy Create free account
hub / github.com/LFYSec/MScan / JClass

Class JClass

src/main/java/pascal/taie/language/classes/JClass.java:50–386  ·  view source on GitHub ↗

Represents classes in the program. Each instance contains various information of a class, including class name, modifiers, declared methods and fields, etc.

Source from the content-addressed store, hash-verified

48 * methods and fields, etc.
49 */
50public class JClass extends AbstractResultHolder
51 implements Annotated, Indexable, Serializable {
52
53 private final JClassLoader loader;
54
55 private final String name;
56
57 private final String moduleName;
58
59 private String simpleName;
60
61 private ClassType type;
62
63 @Nullable
64 @Experimental
65 private ClassGSignature gSignature;
66
67 private Set<Modifier> modifiers;
68
69 private JClass superClass;
70
71 private Collection<JClass> interfaces;
72
73 private JClass outerClass;
74
75 private MultiMap<String, JField> declaredFields;
76
77 private Map<Subsignature, JMethod> declaredMethods;
78
79 private AnnotationHolder annotationHolder;
80
81 private boolean isPhantom;
82
83 private final MultiMap<String, JField> phantomFields = Maps.newMultiMap();
84
85 /**
86 * If this class is application class.
87 */
88 private boolean isApplication;
89
90 private int index = -1;
91
92 public JClass(JClassLoader loader, String name) {
93 this(loader, name, null);
94 }
95
96 public JClass(JClassLoader loader, String name, String moduleName) {
97 this.loader = loader;
98 this.name = name;
99 this.moduleName = moduleName;
100 }
101
102 /**
103 * This method should be called after creating this instance.
104 */
105 public void build(JClassBuilder builder) {
106 simpleName = builder.getSimpleName();
107 type = builder.getClassType();

Callers

nothing calls this directly

Calls 1

newMultiMapMethod · 0.95

Tested by

no test coverage detected