Package proguard.classfile.io.kotlin
Class KotlinMetadataWriter
- java.lang.Object
-
- proguard.classfile.io.kotlin.KotlinMetadataWriter
-
- All Implemented Interfaces:
ElementValueVisitor
,KotlinMetadataVisitor
,ClassVisitor
public class KotlinMetadataWriter extends java.lang.Object implements ClassVisitor, KotlinMetadataVisitor, ElementValueVisitor
This class visitor writes the information stored in a Clazz's kotlinMetadata field to a @kotlin/Metadata annotation on the class.
-
-
Field Summary
Fields Modifier and Type Field Description static KotlinMetadataVersion
HIGHEST_ALLOWED_TO_WRITE
static KotlinMetadataVersion
LATEST_STABLE_SUPPORTED
-
Constructor Summary
Constructors Constructor Description KotlinMetadataWriter(java.util.function.BiConsumer<Clazz,java.lang.String> errorHandler)
KotlinMetadataWriter(java.util.function.BiConsumer<Clazz,java.lang.String> errorHandler, ClassVisitor extraClassVisitor)
KotlinMetadataWriter(WarningPrinter warningPrinter)
Deprecated.UseKotlinMetadataWriter(BiConsumer)
instead.KotlinMetadataWriter(WarningPrinter warningPrinter, ClassVisitor extraClassVisitor)
Deprecated.UseKotlinMetadataWriter(BiConsumer, ClassVisitor)
instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visitAnyClass(Clazz clazz)
Visits any Clazz instance.void
visitAnyKotlinMetadata(Clazz clazz, KotlinMetadata kotlinMetadata)
void
visitArrayElementValue(Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue)
void
visitConstantElementValue(Clazz clazz, Annotation annotation, ConstantElementValue constantElementValue)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.classfile.visitor.ClassVisitor
visitLibraryClass, visitProgramClass
-
Methods inherited from interface proguard.classfile.attribute.annotation.visitor.ElementValueVisitor
visitAnnotationElementValue, visitAnyElementValue, visitClassElementValue, visitEnumConstantElementValue
-
Methods inherited from interface proguard.classfile.kotlin.visitor.KotlinMetadataVisitor
visitKotlinClassMetadata, visitKotlinDeclarationContainerMetadata, visitKotlinFileFacadeMetadata, visitKotlinMultiFileFacadeMetadata, visitKotlinMultiFilePartMetadata, visitKotlinSyntheticClassMetadata, visitUnsupportedKotlinMetadata
-
-
-
-
Field Detail
-
HIGHEST_ALLOWED_TO_WRITE
public static final KotlinMetadataVersion HIGHEST_ALLOWED_TO_WRITE
-
LATEST_STABLE_SUPPORTED
public static final KotlinMetadataVersion LATEST_STABLE_SUPPORTED
-
-
Constructor Detail
-
KotlinMetadataWriter
@Deprecated public KotlinMetadataWriter(WarningPrinter warningPrinter)
Deprecated.UseKotlinMetadataWriter(BiConsumer)
instead.
-
KotlinMetadataWriter
@Deprecated public KotlinMetadataWriter(WarningPrinter warningPrinter, ClassVisitor extraClassVisitor)
Deprecated.UseKotlinMetadataWriter(BiConsumer, ClassVisitor)
instead.
-
KotlinMetadataWriter
public KotlinMetadataWriter(java.util.function.BiConsumer<Clazz,java.lang.String> errorHandler)
-
KotlinMetadataWriter
public KotlinMetadataWriter(java.util.function.BiConsumer<Clazz,java.lang.String> errorHandler, ClassVisitor extraClassVisitor)
-
-
Method Detail
-
visitAnyClass
public void visitAnyClass(Clazz clazz)
Description copied from interface:ClassVisitor
Visits any Clazz instance. The more specific default implementations of this interface delegate to this method.- Specified by:
visitAnyClass
in interfaceClassVisitor
-
visitAnyKotlinMetadata
public void visitAnyKotlinMetadata(Clazz clazz, KotlinMetadata kotlinMetadata)
- Specified by:
visitAnyKotlinMetadata
in interfaceKotlinMetadataVisitor
-
visitConstantElementValue
public void visitConstantElementValue(Clazz clazz, Annotation annotation, ConstantElementValue constantElementValue)
- Specified by:
visitConstantElementValue
in interfaceElementValueVisitor
-
visitArrayElementValue
public void visitArrayElementValue(Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue)
- Specified by:
visitArrayElementValue
in interfaceElementValueVisitor
-
-