Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import net.bytebuddy.description.method.MethodList;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.description.type.TypeList;
import net.bytebuddy.jar.asm.Opcodes;

/** Provides an outline of a type; i.e. the named elements making up its structure. */
final class TypeOutline extends WithName {
Expand Down Expand Up @@ -89,6 +90,30 @@ public int getModifiers() {
return modifiers;
}

@Override
public boolean isAbstract() {
return matchesMask(Opcodes.ACC_ABSTRACT);
}

@Override
public boolean isEnum() {
return matchesMask(Opcodes.ACC_ENUM);
}

@Override
public boolean isInterface() {
return matchesMask(Opcodes.ACC_INTERFACE);
}

@Override
public boolean isAnnotation() {
return matchesMask(Opcodes.ACC_ANNOTATION);
}

private boolean matchesMask(int mask) {
return (this.getModifiers() & mask) == mask;
}

@Override
public ClassFileVersion getClassFileVersion() {
return ClassFileVersion.ofMinorMajor(classFileVersion);
Expand Down
Loading