|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
java.lang.Objectjava.util.ResourceBundle
java.util.ListResourceBundle
public abstract class ListResourceBundle
ListResourceBundle´Â
¸®½ºÆ®¸¦ Æí¸®ÇÏ°í ¿ëÀÌÇÏ°Ô »ç¿ëÇÒ ¼ö ÀÖ´Â ·ÎÄÉÀÏ¿¡ ´ëÇÑ ÀÚ¿øÀ» °ü¸®ÇÏ´Â ResourceBundle
abstract ¼ºê Ŭ·¡½ºÀÔ´Ï´Ù. ÀÚ¿ø ¹øµé ÀϹÝÀûÀ¸·Î ºÙ¾î¼´Â ResourceBundle¸¦ ÂüÁ¶ÇϽʽÿÀ.
¼ºê Ŭ·¡½º´Â getContents¸¦ ¿À¹ö¶óÀ̵å(override) ÇØ, ¹è¿À» Á¦°øÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù. ÀÌ °æ¿ì
¹è¿ÀÇ °¢ Ç׸ñÀº °´Ã¼ÀÇ Æä¾îÀÔ´Ï´Ù. °¢ Æä¾îÀÇ ÃÖÃÊÀÇ ¿ä¼Ò´Â String Ű·Î 2¹øÂ°ÀÇ ¿ä¼Ò´Â ÀÌ Å°¿¡ °ü·ÃµÈ °ªÀÔ´Ï´Ù.
´ÙÀ½ÀÇ ¿¹´Â º£À̽º¸í ¡¸MyResources¡¹ÀÇ ÀÚ¿ø ¹øµé ÆÐ¹Ð¸®ÀÇ 2°³ÀÇ ¸â¹ö¸¦ ³ªÅ¸³À´Ï´Ù. ¡¸MyResources¡¹´Â ¹øµé ÆÐ¹Ð¸®ÀÇ µðÆúÆ®ÀÇ ¸â¹ö·Î ¡¸MyResources_fr¡¹´Â ÇÁ¶û½ºÀÇ ¸â¹öÀÔ´Ï´Ù. ÀÌ·¯ÇÑ ¸â¹ö´Â ListResourceBundle¿¡ ±Ù°ÅÇϰí ÀÖ½À´Ï´Ù (°ü·Ã¿¹¿¡¼´Â ÇÁ·ÎÆÛƼ ÆÄÀÏ¿¡ ±Ù°ÅÇÏÁö ¾Ê´Â ÀÌ ÆÐ¹Ð¸®¿¡°Ô ¹øµéÀ» Ãß°¡ÇÏ´Â ¹æ¹ýÀ» ³ªÅ¸³À´Ï´Ù). ÀÌ ¿¹ÀÇ Å°ÀÇ Çü½ÄÀº s1 µîÀÔ´Ï´Ù. ½ÇÁ¦ÀÇ Å°´Â ¹øµé·ÎºÎÅÍ °´Ã¼¸¦ ²¨³»±â À§Çؼ ÇÁ·Î±×·¥À¸·Î »ç¿ëÇϴ Ű¿Í °°Àº°¡
¸®, ¹¹µçÁö ±¦Âú½À´Ï´Ù. Ű¿¡´Â ´ë¹®ÀÚ/¼Ò¹®ÀÚÀÇ ±¸º°ÀÌ ÀÖ½À´Ï´Ù.
public class MyResources extends ListResourceBundle {
public Object[][] getContents() {
return contents;
}
static final Object[][] contents = {
// LOCALIZE THIS
{"s1", "The disk \"{1}\" contains {0}. "}, // MessageFormat pattern
{"s2", "1"}, // location of {0} in pattern
{"s3", "My Disk"}, // sample disk name
{"s4", "no files"}, // first ChoiceFormat choice
{"s5", "one file"}, // second ChoiceFormat choice
{"s6", "{0, number} files"}, // third ChoiceFormat choice
{"s7", "3 Mar 96"}, // sample date
{"s8", new Dimension(1,5)} // real object, not just string
// END OF MATERIAL TO LOCALIZE
};
}
public class MyResources_fr extends ListResourceBundle {
public Object[][] getContents() {
return contents;
}
static final Object[][] contents = {
// LOCALIZE THIS
{"s1", "Le disque \"{1}\" {0}. "}, // MessageFormat pattern
{"s2", "1"}, // location of {0} in pattern
{"s3", "Mon disque"}, // sample disk name
{"s4", "ne contient pas de fichiers"}, // first ChoiceFormat choice
{"s5", "contient un fichier"}, // second ChoiceFormat choice
{"s6", "contient {0, number} fichiers"}, // third ChoiceFormat choice
{"s7", "3 mars 1996"}, // sample date
{"s8", new Dimension(1,3)} // real object, not just string
// END OF MATERIAL TO LOCALIZE
};
}
ResourceBundle,
PropertyResourceBundle | ÇÊµå °³¿ä |
|---|
| Ŭ·¡½º java.util. ResourceBundle ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
|---|
parent |
| »ý¼ºÀÚ °³¿ä | |
|---|---|
ListResourceBundle ()
À¯ÀÏÇÑ »ý¼ºÀÚ ÀÔ´Ï´Ù. |
|
| ¸Þ¼µå °³¿ä | |
|---|---|
protected abstract Object [][] |
getContents ()
Ŭ·¡½ºÀÇ ¼³¸íÀ» ÂüÁ¶ÇϽʽÿÀ. |
Enumeration <String > |
getKeys ()
ResourceBundle.getKeys ±¸ÇöÀÔ´Ï´Ù. |
Object |
handleGetObject (String key)
ÀÌ ÀÚ¿ø ¹øµé·ÎºÎÅÍ ÁöÁ¤µÈ ŰÀÇ °´Ã¼¸¦ ÃëµæÇÕ´Ï´Ù. |
| Ŭ·¡½º java.util. ResourceBundle ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
getBundle,
getBundle,
getBundle,
getLocale,
getObject,
getString,
getStringArray,
setParent |
| Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| »ý¼ºÀÚ »ó¼¼ |
|---|
public ListResourceBundle()
| ¸Þ¼µåÀÇ »ó¼¼ |
|---|
public final Object handleGetObject(String key)
ResourceBundle
񃬣:
ResourceBundle ³»ÀÇ handleGetObject key - ¹Ù¶÷Á÷ÇÑ °´Ã¼ÀÇ Å°
public Enumeration <String > getKeys()
ResourceBundle ³»ÀÇ getKeys protected abstract Object [][] getContents()
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.