user
07/18/2016, 5:06 PMkotlin
package demo
/**
• This class supports greeting people by name.
•
• @property name The name of the person to be greeted.
*/
class GreeterImpl(val name: String): Greeter {
/**
• Prints the greeting to the standard output.
*/
override fun greet() {
println("Hello $name!")
}
}
/**
• Implementers will greet people.
*/
@Beta
interface Greeter {
fun greet()
}
fun main(args: Array<String>) {
demo.GreeterImpl(args[0]).greet()
}
@Retention(AnnotationRetention.BINARY)
@Target(AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FIELD, AnnotationTarget.FUNCTION,
AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CLASS, AnnotationTarget.FILE)
@MustBeDocumented
annotation class Beta
In this case, the documentation halts. Applying an annotation to the interface methods does not cause issues. (The stack overflow does not occur when the output format is "HTML," only "javadoc")
-------------------------
The "null tag" error occurs if a referenced class has the @suppress
comment added:
kotlin
package demo
/**
• This class supports greeting people by name.
• Inherits from [Greeter] which has a `suppress` doc comment
•
• @property name The name of the person to be greeted.
*/
class GreeterImpl(val name: String): Greeter {
/**
• Prints the greeting to the standard output.
*/
override fun greet() {
println("Hello $name!")
}
}
/**
• @suppress
*/
interface Greeter {
fun greet()
}
fun main(args: Array<String>) {
demo.GreeterImpl(args[0]).greet()
}
In this case, the documentation completes despite the null:-1:-1: Tag @see
messages.
-------------------------
If I come up with additional cases, I will let you know. Hope that helps!