PropertyKind (@NotNull String accessorName) { for (PropertyKind kind : PropertyKind.values()) { String prefix = kind.prefix; int prefixLength = prefix.length(); if (accessorName.startsWith(prefix) && accessorName.length() > prefixLength) { return kind; } } return null; }