Package org.jboss.classfilewriter
Interface ClassFactory
-
public interface ClassFactory
Class definition factory.- Author:
- Richard Opalka
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Class<?>
defineClass(java.lang.ClassLoader loader, java.lang.String name, byte[] b, int off, int len, java.security.ProtectionDomain protectionDomain)
Converts an array of bytes into an instance of class Class.
-
-
-
Method Detail
-
defineClass
java.lang.Class<?> defineClass(java.lang.ClassLoader loader, java.lang.String name, byte[] b, int off, int len, java.security.ProtectionDomain protectionDomain) throws java.lang.ClassFormatError
Converts an array of bytes into an instance of class Class.- Parameters:
loader
- The classloader to be used for class definition.name
- The expected binary name of the class, or null if not knownb
- The bytes that make up the class data. The bytes in positions off through off+len-1 should have the format of a valid class file as defined by The Java™ Virtual Machine Specification.off
- The start offset in b of the class datalen
- The length of the class dataprotectionDomain
- The ProtectionDomain of the class- Returns:
- The Class object that was created from the specified class data.
- Throws:
java.lang.ClassFormatError
- If the data did not contain a valid class
-
-