This commit is contained in:
Volker Berlin 2020-01-12 16:59:02 +01:00
parent dab750f3b6
commit 735aadbab4

View File

@ -285,12 +285,14 @@ public class ClassFile {
/** /**
* Get the type of class. * Get the type of class.
*
* @return the type of the class
*/ */
public Type getType() { public Type getType() {
if( (accessFlags & 0x0200) > 0 ) { if( (accessFlags & 0x0200) > 0 ) {
return Type.Interface; return Type.Interface;
} }
if( superClass.getName().equals( "java/lang/Enum" ) ) { if( superClass != null && superClass.getName().equals( "java/lang/Enum" ) ) {
return Type.Enum; return Type.Enum;
} }
return Type.Class; return Type.Class;