MCPcopy Create free account
hub / github.com/FabricMC/Matcher / getAccess

Method getAccess

src/main/java/matcher/type/ClassInstance.java:448–474  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

446 }
447
448 public int getAccess() {
449 int ret;
450
451 if (asmNodes != null) {
452 ret = asmNodes[0].access;
453
454 if (superClass != null && superClass.id.equals("Ljava/lang/Record;")) { // ACC_RECORD is added by ASM through Record component attribute presence, don't trust the flag to handle stripping of the attribute
455 ret |= Opcodes.ACC_RECORD;
456 }
457 } else {
458 ret = Opcodes.ACC_PUBLIC;
459
460 if (!implementers.isEmpty()) {
461 ret |= Opcodes.ACC_INTERFACE | Opcodes.ACC_ABSTRACT;
462 } else if (superClass != null && superClass.id.equals("Ljava/lang/Enum;")) {
463 ret |= Opcodes.ACC_ENUM;
464 if (childClasses.isEmpty()) ret |= Opcodes.ACC_FINAL;
465 } else if (superClass != null && superClass.id.equals("Ljava/lang/Record;")) {
466 ret |= Opcodes.ACC_RECORD;
467 if (childClasses.isEmpty()) ret |= Opcodes.ACC_FINAL;
468 } else if (interfaces.size() == 1 && interfaces.iterator().next().id.equals("Ljava/lang/annotation/Annotation;")) {
469 ret |= Opcodes.ACC_ANNOTATION | Opcodes.ACC_INTERFACE | Opcodes.ACC_ABSTRACT;
470 }
471 }
472
473 return ret;
474 }
475
476 public boolean isInterface() {
477 return (getAccess() & Opcodes.ACC_INTERFACE) != 0;

Callers 9

isInterfaceMethod · 0.95
isEnumMethod · 0.95
isAnnotationMethod · 0.95
isRecordMethod · 0.95
getScoreMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45
isHierarchyBarrierMethod · 0.45

Calls 4

sizeMethod · 0.80
iteratorMethod · 0.80
equalsMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected