view src/main/groovy/org/ssdt_ohio/gradle/doc/tools/UserClassDocProxy.groovy @ 20:e8e14d5d6be2

improve formatting. exclude @transient and version
author smith@nwoca.org
date Fri, 08 Jan 2016 20:16:44 +0000
parents 8400a7db1330
children e2d02e8742be
line wrap: on
line source
/*
 * Copyright (c) 2013.  Ohio Department of Education. - All Rights Reserved.
 * Unauthorized copying of this file, in any medium, is strictly prohibited.
 * Written by State Software Development Team (http://ssdt.oecn.k12.oh.us/)
 */

package org.ssdt_ohio.gradle.doc.tools

import org.codehaus.groovy.groovydoc.GroovyFieldDoc

class UserClassDocProxy extends groovy.util.Proxy {

    GroovyFieldDoc[] properties() {
        println "getting properties for $adaptee"
        getAdaptee().properties().findAll { GroovyFieldDoc p ->
            !p.isTransient() &&
                    p.name() != 'version' &&
                    !p.annotations().any { it.name().contains('Transient') }
        }

    }

    def propertyMissing(String name) { getAdaptee()."$name" }

}