Package com.squareup.kotlinpoet.metadata.specs

Types

ClassData
Link copied to clipboard
data class ClassData(declarationContainer: ImmutableKmClass, className: ClassName, annotations: Collection<AnnotationSpec>, properties: Map<ImmutableKmProperty, PropertyData>, constructors: Map<ImmutableKmConstructor, ConstructorData>, methods: Map<ImmutableKmFunction, MethodData>) : ContainerData
Represents relevant information on a Kotlin class used for ClassInspector.
ClassInspector
Link copied to clipboard
interface ClassInspector
A basic interface for looking up JVM information about a given Class.
ConstructorData
Link copied to clipboard
data class ConstructorData(annotations: List<AnnotationSpec>, parameterAnnotations: Map<Int, Collection<AnnotationSpec>>, isSynthetic: Boolean, jvmModifiers: Set<JvmMethodModifier>, exceptions: List<TypeName>)
Represents relevant information on a constructor used for ClassInspector.
ContainerData
Link copied to clipboard
interface ContainerData
Represents relevant information on a declaration container used for ClassInspector.
EnumEntryData
Link copied to clipboard
data class EnumEntryData(declarationContainer: ImmutableKmClass?, annotations: Collection<AnnotationSpec>)
Represents relevant information on a Kotlin enum entry.
FieldData
Link copied to clipboard
data class FieldData(annotations: List<AnnotationSpec>, isSynthetic: Boolean, jvmModifiers: Set<JvmFieldModifier>, constant: CodeBlock?)
Represents relevant information on a field used for ClassInspector.
FileData
Link copied to clipboard
data class FileData(declarationContainer: ImmutableKmPackage, annotations: Collection<AnnotationSpec>, properties: Map<ImmutableKmProperty, PropertyData>, methods: Map<ImmutableKmFunction, MethodData>, className: ClassName, jvmName: String?) : ContainerData
Represents relevant information on a file facade used for ClassInspector.
JvmFieldModifier
Link copied to clipboard
enum JvmFieldModifier : Enum<JvmFieldModifier> , JvmModifier
Modifiers that are annotations in Kotlin but modifier keywords in bytecode.
JvmMethodModifier
Link copied to clipboard
enum JvmMethodModifier : Enum<JvmMethodModifier> , JvmModifier
Modifiers that are annotations or implicit in Kotlin but modifier keywords in bytecode.
JvmModifier
Link copied to clipboard
interface JvmModifier
Represents a JVM modifier that is represented as an annotation in Kotlin but as a modifier in bytecode.
MethodData
Link copied to clipboard
data class MethodData(annotations: List<AnnotationSpec>, parameterAnnotations: Map<Int, Collection<AnnotationSpec>>, isSynthetic: Boolean, jvmModifiers: Set<JvmMethodModifier>, isOverride: Boolean, exceptions: List<TypeName>)
Represents relevant information on a method used for ClassInspector.
PropertyData
Link copied to clipboard
data class PropertyData(annotations: List<AnnotationSpec>, fieldData: FieldData?, getterData: MethodData?, setterData: MethodData?, isJvmField: Boolean)
Represents relevant information on a property used for ClassInspector.
TypeNameAliasTag
Link copied to clipboard
class TypeNameAliasTag(type: TypeName)
This tag indicates that this TypeName represents a typealias type.

Functions

classFor
Link copied to clipboard
fun ClassInspector.classFor(className: ClassName): ImmutableKmClass
Looks up other classes, such as for nested members.
containerData
Link copied to clipboard
fun ClassInspector.containerData(className: ClassName, parentClassName: ClassName?): ContainerData
Creates a new ContainerData instance for a given className.
toFileSpec
Link copied to clipboard
fun Class<*>.toFileSpec(classInspector: ClassInspector? = null): FileSpec
fun TypeElement.toFileSpec(classInspector: ClassInspector? = null): FileSpec
fun KClass<*>.toFileSpec(classInspector: ClassInspector? = null): FileSpec
fun ImmutableKmClass.toFileSpec(classInspector: ClassInspector?, className: ClassName = createClassName(name)): FileSpec
fun ImmutableKmPackage.toFileSpec(classInspector: ClassInspector?, className: ClassName): FileSpec
toTypeSpec
Link copied to clipboard
fun Class<*>.toTypeSpec(classInspector: ClassInspector? = null): TypeSpec
fun TypeElement.toTypeSpec(classInspector: ClassInspector? = null): TypeSpec
fun KClass<*>.toTypeSpec(classInspector: ClassInspector? = null): TypeSpec
fun ImmutableKmClass.toTypeSpec(classInspector: ClassInspector?, className: ClassName = createClassName(name)): TypeSpec