Skip to content

TheForbiddenAi/JenkinsParser-Kotlin

Repository files navigation

JenkinsParser-Kotlin

A kotlin library, which also supports java, designed to easily parse jenkins javadocs

Documentation

Dependencies

Latest Version

Make sure to replace VERSION with the version shown above

Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
<dependency>
    <groupId>com.github.TheForbiddenAi</groupId>
    <artifactId>JenkinsParser-Kotlin</artifactId>
    <version>VERSION</version>
</dependency>

Gradle

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}
dependencies {
    implementation 'com.github.TheForbiddenAi:JenkinsParser-Kotlin:VERSION'
}

Initialization

First, you must create an instance of Jenkins

val jenkins = Jenkins(url)

Usage

Querying classes, methods, enums, and fields:

val infoList = jenkins.search("String")

val classInfo = jenkins.retrieveClass("String")
val methodInfo = jenkins.retrieveMethod("String", "valueOf")
// If you already have a class information object defined you can use:
val methodInfoWithClass = jenkins.retrieveMethod(classInfo, "valueOf")
// This works for fields and enums as well

val enumInfo = jenkins.retrieveEnum("Component.BaselineResizeBehavior", "center_offset")
val fieldInfo = jenkins.retrieveField("String", "case_insensitive_order")

When searching for multiple classes, or methods, with the same name use:

val classes = jenkins.searchClasses("Object")
val methods = jenkins.searchMethods("String", "valueOf")

// Or you can use the search method
val infoList = jenkins.search("String.valueOf")

When searching for something in a class where you may not know if it is a method, enum, or field use:

val classInfo = jenkins.retrieveClass("String")
val infoList = classInfo.searchAll("valueOf")

About

A kotlin library, which also supports java, designed to easily parse jenkins javadocs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages