org.jboss.classfilewriter.ClassFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of undertow-parser-generator Show documentation
Show all versions of undertow-parser-generator Show documentation
An annotation processor that is used to generate the HTTP parser
/*
* JBoss, Home of Professional Open Source.
*
* Copyright 2019 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.classfilewriter;
import java.security.ProtectionDomain;
/**
* Class definition factory.
*
* @author Richard Opalka
*/
public interface ClassFactory {
/**
* Converts an array of bytes into an instance of class Class.
*
* @param loader
* The classloader to be used for class definition.
*
* @param name
* The expected binary name of the class, or
* null if not known
*
* @param b
* 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.
*
* @param off
* The start offset in b of the class data
*
* @param len
* The length of the class data
*
* @param protectionDomain
* The ProtectionDomain of the class
*
* @return The Class object that was created from the specified
* class data.
*
* @throws ClassFormatError
* If the data did not contain a valid class
*/
Class> defineClass(ClassLoader loader, String name, byte[] b, int off, int len, ProtectionDomain protectionDomain) throws ClassFormatError;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy