Created
May 14, 2019 20:43
-
-
Save ntngel1/f7f261f721b22577a0aaef5e49a88b4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val clas = KotlinClass( | |
name = "Kek", | |
modifiers = arrayListOf("open", "internal", "private"), | |
annotations = arrayListOf( | |
KotlinAnnotation(name = "WithoutArgs"), | |
KotlinAnnotation(name = "WithArgs", arguments = arrayListOf( | |
KotlinArgument(value = "someValue"), KotlinArgument(parameterName = "someName", value = "someValue") | |
)) | |
), | |
classInheritance = KotlinClassInheritance(className = "SomeClass", arguments = arrayListOf( | |
KotlinArgument(parameterName = "Kek", value = "0.0F"), | |
KotlinArgument(value = "someValue"), | |
KotlinArgument(parameterName = "someName", value = "someValue") | |
)), | |
implementedInterfaces = arrayListOf( | |
KotlinInterfaceImplementation(interfaceName = "SomeInterface1"), | |
KotlinInterfaceImplementation(interfaceName = "SomeInterface2") | |
), | |
properties = arrayListOf( | |
KotlinProperty( | |
isMutable = false, | |
name = "firstProperty", | |
type = KotlinType(name = "String"), | |
modifiers = arrayListOf("override", "public"), | |
defaultValue = "\"SomeStringValue\"", | |
annotations = arrayListOf( | |
KotlinAnnotation(name = "WithoutArgs"), | |
KotlinAnnotation(name = "WithArgs", arguments = arrayListOf( | |
KotlinArgument(value = "someValue"), KotlinArgument(parameterName = "someName", value = "someValue") | |
)) | |
) | |
) | |
), | |
methods = arrayListOf( | |
KotlinFunction( | |
name = "someFunction", | |
body = "//something" | |
) | |
), | |
staticMethods = arrayListOf( | |
KotlinFunction( | |
name = "someFunction", | |
returnType = KotlinType(name = "Float") | |
body = "return 0.0F", | |
) | |
) | |
) | |
val classDeclaration = ClassDeclaration(clas).generate() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment