protected MessageResourceBundleObjectiveWrapper wrapBundle(String messageName, MessageResourceBundle bundle, Integer extendsLevel) {
        final boolean existsDefaultLangProperties = existsDefaultLangProperties(messageName);
        final List<MessageResourceBundle> bundleList = new ArrayList<MessageResourceBundle>();
        bundleList.add(bundle);
        MessageResourceBundle currentBundle = bundle;
        int parentLevel = 1;
        while (true) {
            MessageResourceBundle parentBundle = currentBundle.getParent();
            if (parentBundle == null) {
                break;
            }
            final boolean defaultLang = isDefaultLangBundle(existsDefaultLangProperties, parentBundle);
            currentBundle.setParent(createBundleWrapper(parentBundle, defaultLang, parentLevel, extendsLevel));
            currentBundle = parentBundle;
            ++parentLevel;
        }
        return createBundleWrapper(bundle, isDefaultLangBundle(existsDefaultLangProperties, bundle), null, extendsLevel);
    }
protected MessageResourceBundleObjectiveWrapper wrapBundle ( String messageName , MessageResourceBundle bundle , Integer extendsLevel ) { final boolean existsDefaultLangProperties = existsDefaultLangProperties ( messageName ) ; final List < MessageResourceBundle > bundleList = new ArrayList < MessageResourceBundle > ( ) ; bundleList . add ( bundle ) ; MessageResourceBundle currentBundle = bundle ; int parentLevel = 1 ; while ( true ) { MessageResourceBundle parentBundle = currentBundle . getParent ( ) ; if ( parentBundle == null ) { break ; } final boolean defaultLang = isDefaultLangBundle ( existsDefaultLangProperties , parentBundle ) ; currentBundle . setParent ( createBundleWrapper ( parentBundle , defaultLang , parentLevel , extendsLevel ) ) ; currentBundle = parentBundle ; ++ parentLevel ; } return createBundleWrapper ( bundle , isDefaultLangBundle ( existsDefaultLangProperties , bundle ) , null , extendsLevel ) ; }
Wrap the bundle with detail info of message resource. <br>
The parents also wrapped.
@param messageName The message name for the bundle. (NotNull)
@param bundle The bundle of message resource. (NotNull)
@param extendsLevel The level as integer for extends. e.g. first extends is 1 (NullAllowed: when application)
@return The wrapper for the bundle. (NotNull)