blob: d6813141a6fb9cf942d7f797b4c227075ec6dec3 [file] [log] [blame]
package java
import (
"unicode"
"unicode/utf8"
)
// accessModifierForName returns the Java access modifier given the name.
// It follows VDL naming conventions, indicating that an uppercase name
// denotes a public type and a lowercase name a package-protected type.
func accessModifierForName(name string) string {
r, _ := utf8.DecodeRuneInString(name)
if unicode.IsUpper(r) {
return "public"
}
return ""
}