class ByteCodeUtils {

    @NonNull
    public static Optional<String> getPackageName(@NonNull String internalName) {
        List<String> parts = Splitter.on('/').splitToList(internalName);
        if (parts.size() == 1) {
            return Optional.empty();
        }

        return Optional.of(Joiner.on('.').join(parts.subList(0, parts.size() - 1)));
    }

}