Example usage for java.lang ClassFormatError ClassFormatError

List of usage examples for java.lang ClassFormatError ClassFormatError

Introduction

In this page you can find the example usage for java.lang ClassFormatError ClassFormatError.

Prototype

public ClassFormatError() 

Source Link

Document

Constructs a ClassFormatError with no detail message.

Usage

From source file:SelfClassLoader.java

protected Class findClass(String name) throws ClassNotFoundException {
    byte[] bytes = loadClassBytes(name);
    Class theClass = defineClass(name, bytes, 0, bytes.length);
    if (theClass == null)
        throw new ClassFormatError();
    return theClass;
}