java.util.ResourceBundle.setParent()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(180)

本文整理了Java中java.util.ResourceBundle.setParent方法的一些代码示例,展示了ResourceBundle.setParent的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceBundle.setParent方法的具体详情如下:
包路径:java.util.ResourceBundle
类名称:ResourceBundle
方法名:setParent

ResourceBundle.setParent介绍

[英]Sets the parent resource bundle of this ResourceBundle. The parent is searched for resources which are not found in this ResourceBundle.
[中]设置此ResourceBundle的父资源束。搜索父级以查找在此ResourceBundle中未找到的资源。

代码示例

代码示例来源:origin: stackoverflow.com

setParent(ResourceBundle.getBundle(BUNDLE_NAME, 
  FacesContext.getCurrentInstance().getViewRoot().getLocale(), UTF8_CONTROL));

代码示例来源:origin: robovm/robovm

ResourceBundle parent = handleGetBundle(loadBase, base, strippedLocale, loader);
if (parent != null) {
  bundle.setParent(parent);

代码示例来源:origin: robovm/robovm

currentBundle.setParent(bundle);
  currentBundle = bundle;
} else {

代码示例来源:origin: stackoverflow.com

setParent(ResourceBundle.getBundle(baseName, CONTROL));

代码示例来源:origin: org.opencms/opencms-core

/**
 * @see java.util.ResourceBundle#setParent(java.util.ResourceBundle)
 */
@Override
public void setParent(ResourceBundle p) {
  super.setParent(p);
}

代码示例来源:origin: mx4j/mx4j-tools

void setParent(NestedResourceBundle parent)
{
  super.setParent(parent);
}

代码示例来源:origin: org.apache.sling/org.apache.sling.i18n

@Override
protected void setParent(ResourceBundle parent) {
  super.setParent(parent);
}

代码示例来源:origin: org.tentackle/tentackle-i18n

/**
 * Sets the parent stored bundle.
 *
 * @param parent the parent bundle
 */
void setParent(StoredResourceBundle parent) {
 super.setParent(parent);
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.osgi

public void setParent(ResourceBundle parent) {
  super.setParent(parent);
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.osgi

public void setParent(ResourceBundle parent) {
  super.setParent(parent);
}

代码示例来源:origin: stackoverflow.com

public class MyCLIResourceBundle extends ResourceBundle {
  public MyCLIResourceBundle(ResourceBundle parent) {
    super();
    this.setParent(parent);
    // go on and load your chosen properties from System.getProperties() or wherever
  }
}

代码示例来源:origin: com.github.veithen.cosmos/cosmos-equinox

public void setParent(ResourceBundle parent) {
  super.setParent(parent);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.osgi

public void setParent(ResourceBundle parent) {
  super.setParent(parent);
}

代码示例来源:origin: org.eclipse/org.eclipse.osgi

public void setParent(ResourceBundle parent) {
  super.setParent(parent);
}

代码示例来源:origin: com.manydesigns/portofino-base

@Override
public void setParent(ResourceBundle parent) {
  super.setParent(parent);
}

代码示例来源:origin: ManyDesigns/Portofino

@Override
public void setParent(ResourceBundle parent) {
  super.setParent(parent);
}

代码示例来源:origin: org.eclipse/osgi

public void setParent(ResourceBundle parent) {
  super.setParent(parent);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi

public void setParent(ResourceBundle parent) {
  super.setParent(parent);
}

代码示例来源:origin: stackoverflow.com

public class foobar_nn extends ListResourceBundle {
  public foobar_nn {
    setParent(ResourceBundle.getBundle("foobar", new Locale("nb")));
  }

  @Override 
  protected Object[][] getContents()  {
    return new Object[0][0];
  }
}

代码示例来源:origin: stackoverflow.com

/* Create this class to make it base class for Loading Bundle for JSF apps */
public class Message extends ResourceBundle {
    public Messages (){
        File file = new File("D:\\properties\\i18n");  
        ClassLoader loader=null;
          try {
            URL[] urls = {file.toURI().toURL()};  
            loader = new URLClassLoader(urls); 
            ResourceBundle bundle = getBundle("message", FacesContext.getCurrentInstance().getViewRoot().getLocale(), loader);
            setParent(bundle);
            } catch (MalformedURLException ex) { }
    }
   .
   .
   .
  }

相关文章