Package org.apache.tomcat.jakartaee
Class ClassConverter
- java.lang.Object
-
- org.apache.tomcat.jakartaee.ClassConverter
-
- All Implemented Interfaces:
ClassFileTransformer,Converter
public class ClassConverter extends Object implements Converter, ClassFileTransformer
-
-
Field Summary
Fields Modifier and Type Field Description protected EESpecProfileprofile
-
Constructor Summary
Constructors Constructor Description ClassConverter()ClassConverter(EESpecProfile profile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(String filename)voidconvert(String path, InputStream src, OutputStream dest, EESpecProfile profile)Copies the source to the destination, converting it if necessary, according to the requirements of the given profile.protected voidconvertInternal(String path, InputStream src, OutputStream dest, EESpecProfile profile, ClassLoader loader)StringtoString()byte[]transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.instrument.ClassFileTransformer
transform
-
-
-
-
Field Detail
-
profile
protected final EESpecProfile profile
-
-
Constructor Detail
-
ClassConverter
public ClassConverter()
-
ClassConverter
public ClassConverter(EESpecProfile profile)
-
-
Method Detail
-
convert
public void convert(String path, InputStream src, OutputStream dest, EESpecProfile profile) throws IOException
Description copied from interface:ConverterCopies the source to the destination, converting it if necessary, according to the requirements of the given profile.- Specified by:
convertin interfaceConverter- Parameters:
path- The path to the data being convertedsrc- The source data to convertdest- The destination to write the converted dataprofile- The profile that defines the conversion required- Throws:
IOException- If the conversion fails
-
transform
public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException
- Specified by:
transformin interfaceClassFileTransformer- Throws:
IllegalClassFormatException
-
convertInternal
protected void convertInternal(String path, InputStream src, OutputStream dest, EESpecProfile profile, ClassLoader loader) throws IOException
- Throws:
IOException
-
-