Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

Feather doesn't support different access levels (yet?), but we do need to make a constructor private. So I've added the minimum required.

Link copied to clipboard
class ParameterizedTypeImplementation(rawType: Class<*>, actualTypeArguments: Array<out Type>, ownerType: Type? = null) : ParameterizedType

This is a near identical copy of the implementation in sun.reflect.generics.reflectiveObjects. Needed to re-implement it because the sun package is not a public API.

Link copied to clipboard

When a generic type is in the form MyClass<>, then the "" is defined as a StarProjection.

Link copied to clipboard

Functions

Link copied to clipboard
fun MethodVisitor.addLineNumber(position: FeatherPosition?)
Link copied to clipboard
Link copied to clipboard

When given two primitive number types, works out which is the "larger", so that an operation between the two will "auto-cast" to the "larger" type so that data is not lost.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun findCommonSuperTypes(vararg types: Type): List<Type>
Link copied to clipboard
fun functionType(argTypes: List<Type>, returnType: Type): Type
fun functionType(owner: Type, argTypes: List<Type>, returnType: Type): Type
Link copied to clipboard
fun getterName(fieldName: String): String
Link copied to clipboard
fun intConstant(mv: MethodVisitor, value: Int)
Link copied to clipboard
Link copied to clipboard
fun isAssignable(fromType: Type, toType: Type): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun loadArray(mv: MethodVisitor, type: Type)

Assumes the top of the stack is array, index, and is replaced with the value.

Link copied to clipboard
fun newArray(mv: MethodVisitor, type: Type)

Assumes the top of the stack contains the size of the array

fun newArray(mv: MethodVisitor, size: Int, type: Type)
Link copied to clipboard
fun resolveGenericType(source: Type, toResolve: Type): Type

Returns the generic type of Type toResolve, which may be a TypeVariable, or a ParametrizedType containing TypeVariables.

Link copied to clipboard
fun setterName(fieldName: String): String
Link copied to clipboard
fun storeArray(mv: MethodVisitor, type: Type)

Assumes the top of the stack is array, index, value, and is replaced with

Link copied to clipboard