JavaTM 2 Platform
Standard Ed. 5.0

java.beans
Ŭ·¡½º PropertyDescriptor

java.lang.Object 
  »óÀ§¸¦ È®Àå java.beans.FeatureDescriptor 
      »óÀ§¸¦ È®Àå java.beans.PropertyDescriptor
¾Ë·ÁÁø Á÷°è ¼­ºê Ŭ·¡½º:
IndexedPropertyDescriptor

public class PropertyDescriptor
extends FeatureDescriptor

PropertyDescriptor´Â Java Bean°¡ ÇÑ ¹úÀÇ ¾×¼¼½º¿ë ¸Þ¼­µå¸¦ »ç¿ëÇØ export ÇÏ´Â ´ÜÀÏÀÇ ÇÁ·ÎÆÛƼ¸¦ ±â¼úÇÕ´Ï´Ù.


»ý¼ºÀÚ °³¿ä
PropertyDescriptor (String  propertyName, Class <? > beanClass)
          ¾×¼¼½º¿ë ¸Þ¼­µå getFoo ¹× setFoo¸¦ »ç¿ëÇØ, Ç¥ÁØÀÇ Java ±Ô¾à¿¡ ÁØ°ÅÇÏ°í ÀÖ´Â ÇÁ·ÎÆÛƼÀÇ PropertyDescriptor¸¦ ±¸ÃàÇÕ´Ï´Ù.
PropertyDescriptor (String  propertyName, Class <? > beanClass, String  readMethodName, String  writeMethodName)
          ÀÌ »ý¼ºÀÚ´Â ´Ü¼øÇÑ ÇÁ·ÎÆÛƼ¸í°ú ÇÁ·ÎÆÛƼÀÇ read ¹× write¹«ÀÇ ¸Þ¼­µå¸íÀ» Àμö¿¡ ÃëÇÕ´Ï´Ù.
PropertyDescriptor (String  propertyName, Method  readMethod, Method  writeMethod)
          ÀÌ »ý¼ºÀÚ´Â ´Ü¼øÇÑ ÇÁ·ÎÆÛƼ¸í°ú ÇÁ·ÎÆÛƼÀÇ read ¹× write¹«ÀÇ Method °´Ã¼¸¦ Àμö¿¡ ÃëÇÕ´Ï´Ù.
 
¸Þ¼­µå °³¿ä
 PropertyEditor createPropertyEditor (Object  bean)
          ÇöÀçÀÇ ÇÁ·ÎÆÛƼ ¿¡µðÅÍ Å¬·¡½º¸¦ »ç¿ëÇØ, ÇÁ·ÎÆÛƼ ¿¡µðÅÍÀÇ ÀνºÅϽº¸¦ ±¸ÃàÇÕ´Ï´Ù.
 boolean equals (Object  obj)
          PropertyDescriptor¿Í ÁöÁ¤µÈ °´Ã¼¸¦ Á¶ÇÕÇÕ´Ï´Ù.
 Class <? > getPropertyEditorClass ()
          ÀÌ ÇÁ·ÎÆÛƼÀÇ ¸í½ÃÀûÀÎ µî·ÏÀÌ ³¡³­ PropertyEditor Ŭ·¡½º¸¦ ÃëµæÇÕ´Ï´Ù.
 Class <? > getPropertyType ()
          ÇÁ·ÎÆÛƼÀÇ Class °´Ã¼¸¦ ÃëµæÇÕ´Ï´Ù.
 Method getReadMethod ()
          ÇÁ·ÎÆÛƼġÀÇ Àб⿡ »ç¿ëÇÏ´Â ¸Þ¼­µå¸¦ ÃëµæÇÕ´Ï´Ù.
 Method getWriteMethod ()
          ÇÁ·ÎÆÛƼġÀÇ Ãâ·ÂÀ» »ç¿ëÇÏ´Â ¸Þ¼­µå¸¦ ÃëµæÇÕ´Ï´Ù.
 int hashCode ()
          ÀÌ °´Ã¼ÀÇ Çؽà Äڵ尪À» ¸®ÅÏÇÕ´Ï´Ù.
 boolean isBound ()
          ¹Ù¿îµå ÇÁ·ÎÆÛƼ¸¦ °»½ÅÇØ, ÇÁ·ÎÆÛƼÀÇ º¯°æ½Ã¿¡ PropertyChange À̺¥Æ®°¡ Æ®¸®°Å µÇµµ·Ï ÇÕ´Ï´Ù.
 boolean isConstrained ()
          Á¦¾à ÇÁ·ÎÆÛƼÀÇ °»½ÅÀ» ½ÃµµÇØ ÇÁ·ÎÆÛƼÀÇ º¯°æ½Ã¿¡ VetoableChange À̺¥Æ®°¡ Æ®¸®°Å µÇµµ·Ï ÇÕ´Ï´Ù.
 void setBound (boolean bound)
          ¹Ù¿îµå ÇÁ·ÎÆÛƼ¸¦ °»½ÅÇØ, ÇÁ·ÎÆÛƼÀÇ º¯°æ½Ã¿¡ PropertyChange À̺¥Æ®°¡ Æ®¸®°Å µÇµµ·Ï ÇÕ´Ï´Ù.
 void setConstrained (boolean constrained)
          Á¦¾à ÇÁ·ÎÆÛƼÀÇ °»½ÅÀ» ½ÃµµÇØ ÇÁ·ÎÆÛƼÀÇ º¯°æ½Ã¿¡ VetoableChange À̺¥Æ®°¡ Æ®¸®°Å µÇµµ·Ï ÇÕ´Ï´Ù.
 void setPropertyEditorClass (Class <? > propertyEditorClass)
          º¸Åë, PropertyEditor´Â PropertyEditorManager¸¦ »ç¿ëÇØ °Ë»öµË´Ï´Ù¸¸, ¾î¶°ÇÑ ÀÌÀ¯¿¡ ÀÇÇØ Æ¯Á¤ÀÇ PropertyEditor¸¦ ÁöÁ¤ ÇÁ·ÎÆÛƼ¿¡ °ü·ÃÁþ°í ½ÍÀº °æ¿ì´Â ÀÌ ¸Þ¼­µå¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
 void setReadMethod (Method  readMethod)
          ÇÁ·ÎÆÛƼġÀÇ Àб⿡ »ç¿ëÇÏ´Â ¸Þ¼­µå¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setWriteMethod (Method  writeMethod)
          ÇÁ·ÎÆÛƼġÀÇ Ãâ·ÂÀ» »ç¿ëÇÏ´Â ¸Þ¼­µå¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 
Ŭ·¡½º java.beans. FeatureDescriptor ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

»ý¼ºÀÚ »ó¼¼

PropertyDescriptor

public PropertyDescriptor(String  propertyName,
                          Class <? > beanClass)
                   throws IntrospectionException 
¾×¼¼½º¿ë ¸Þ¼­µå getFoo ¹× setFoo¸¦ »ç¿ëÇØ, Ç¥ÁØÀÇ Java ±Ô¾à¿¡ ÁØ°ÅÇÏ°í ÀÖ´Â ÇÁ·ÎÆÛƼÀÇ PropertyDescriptor¸¦ ±¸ÃàÇÕ´Ï´Ù. Àμö¸íÀÌ fred À̸é, Ãâ·Â¿ë ¸Þ¼­µå´Â setFred, read¿ë ¸Þ¼­µå´Â getFred (boolean ÇÁ·ÎÆÛƼ¿¡¼­´Â isFred)°¡ µË´Ï´Ù. ÇÁ·ÎÆÛƼ¸íÀº ¹Ýµå½Ã ¼Ò¹®ÀÚ·Î ½ÃÀ۵˴ϴٸ¸, ¸Þ¼­µå¸í¿¡¼­´Â ¼±µÎ ¹®ÀÚ°¡ ´ë¹®ÀÚ°¡ µÇ´Â °Í¿¡ ÁÖÀÇÇØ ÁÖ¼¼¿ä.

ÆĶó¹ÌÅÍ:
propertyName - ÇÁ·ÎÆÛƼÀÇ ÇÁ·Î±×·¥¸í
beanClass - Ÿ°Ù bean Class °´Ã¼. ¿¹¸¦ µé¾î sun.beans.OurButton.class
¿¹¿Ü:
IntrospectionException - ÀÎÆ®·Î½ºÆäÅ©¼ÇÁß¿¡ ¿¹¿Ü°¡ ¹ß»ýÇßÀ» °æ¿ì

PropertyDescriptor

public PropertyDescriptor(String  propertyName,
                          Class <? > beanClass,
                          String  readMethodName,
                          String  writeMethodName)
                   throws IntrospectionException 
ÀÌ »ý¼ºÀÚ´Â ´Ü¼øÇÑ ÇÁ·ÎÆÛƼ¸í°ú ÇÁ·ÎÆÛƼÀÇ read ¹× write¹«ÀÇ ¸Þ¼­µå¸íÀ» Àμö¿¡ ÃëÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
propertyName - ÇÁ·ÎÆÛƼÀÇ ÇÁ·Î±×·¥¸í
beanClass - Ÿ°Ù bean Class °´Ã¼. ¿¹¸¦ µé¾î sun.beans.OurButton.class
readMethodName - ÇÁ·ÎÆÛƼġÀÇ Àб⿡ »ç¿ëÇÏ´Â ¸Þ¼­µå¸í. ÇÁ·ÎÆÛƼ°¡ Ãâ·ÂÀü¿ëÀÇ °æ¿ì´Â null
writeMethodName - ÇÁ·ÎÆÛƼġÀÇ Ãâ·ÂÀ» »ç¿ëÇÏ´Â ¸Þ¼­µå¸í. ÇÁ·ÎÆÛƼ°¡ Àбâ Àü¿ë ÀÇ °æ¿ì´Â null
¿¹¿Ü:
IntrospectionException - ÀÎÆ®·Î½ºÆäÅ©¼ÇÁß¿¡ ¿¹¿Ü°¡ ¹ß»ýÇßÀ» °æ¿ì

PropertyDescriptor

public PropertyDescriptor(String  propertyName,
                          Method  readMethod,
                          Method  writeMethod)
                   throws IntrospectionException 
ÀÌ »ý¼ºÀÚ´Â ´Ü¼øÇÑ ÇÁ·ÎÆÛƼ¸í°ú ÇÁ·ÎÆÛƼÀÇ read ¹× write¹«ÀÇ Method °´Ã¼¸¦ Àμö¿¡ ÃëÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
propertyName - ÇÁ·ÎÆÛƼÀÇ ÇÁ·Î±×·¥¸í
readMethod - ÇÁ·ÎÆÛƼġÀÇ Àб⿡ »ç¿ëÇÏ´Â ¸Þ¼­µå. ÇÁ·ÎÆÛƼ°¡ Ãâ·ÂÀü¿ëÀÇ °æ¿ì´Â null
writeMethod - ÇÁ·ÎÆÛƼġÀÇ Ãâ·ÂÀ» »ç¿ëÇÏ´Â ¸Þ¼­µå. ÇÁ·ÎÆÛƼ°¡ Àбâ Àü¿ë ÀÇ °æ¿ì´Â null
¿¹¿Ü:
IntrospectionException - ÀÎÆ®·Î½ºÆäÅ©¼ÇÁß¿¡ ¿¹¿Ü°¡ ¹ß»ýÇßÀ» °æ¿ì
¸Þ¼­µåÀÇ »ó¼¼

getPropertyType

public Class <? > getPropertyType()
ÇÁ·ÎÆÛƼÀÇ Class °´Ã¼¸¦ ÃëµæÇÕ´Ï´Ù.

¹Ýȯ°ª:
ÇÁ·ÎÆÛƼÀÇ Java Çü Á¤º¸. Class °´Ã¼´Â int µîÀÇ ºôÆ®ÀÎÀÇ Java ÇüÀ» ±â¼úÇÏ´Â °æ¿ì°¡ ÀÖÀ¸¹Ç·Î ÁÖÀÇÇÑ´Ù. À妽º ¾øÀ½ ¾×¼¼½º¸¦ Áö¿øÇÏÁö ¾Ê´Â À妽º ÷ºÎ ÇÁ·ÎÆÛƼÀÇ °æ¿ì, °á°ú´Â nullÀÌ µÈ´Ù

ReadMethod°¡ µ¹·ÁÁÖ´Â ÇüÅÂ


getReadMethod

public Method  getReadMethod()
ÇÁ·ÎÆÛƼġÀÇ Àб⿡ »ç¿ëÇÏ´Â ¸Þ¼­µå¸¦ ÃëµæÇÕ´Ï´Ù.

¹Ýȯ°ª:
ÇÁ·ÎÆÛƼġÀÇ Àб⿡ »ç¿ëÇÏ´Â ¸Þ¼­µå. ÇÁ·ÎÆÛƼ¸¦ ÀоîµéÀÏ ¼ö ¾ø´Â °æ¿ì´Â null

setReadMethod

public void setReadMethod(Method  readMethod)
                   throws IntrospectionException 
ÇÁ·ÎÆÛƼġÀÇ Àб⿡ »ç¿ëÇÏ´Â ¸Þ¼­µå¸¦ ¼³Á¤ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
readMethod - »õ·Î¿î read ¸Þ¼­µå
¿¹¿Ü:
IntrospectionException

getWriteMethod

public Method  getWriteMethod()
ÇÁ·ÎÆÛƼġÀÇ Ãâ·ÂÀ» »ç¿ëÇÏ´Â ¸Þ¼­µå¸¦ ÃëµæÇÕ´Ï´Ù.

¹Ýȯ°ª:
ÇÁ·ÎÆÛƼġÀÇ Ãâ·ÂÀ» »ç¿ëÇÏ´Â ¸Þ¼­µå. ÇÁ·ÎÆÛƼ¸¦ Ãâ·ÂÇÒ ¼ö ¾ø´Â °æ¿ì´Â null

setWriteMethod

public void setWriteMethod(Method  writeMethod)
                    throws IntrospectionException 
ÇÁ·ÎÆÛƼġÀÇ Ãâ·ÂÀ» »ç¿ëÇÏ´Â ¸Þ¼­µå¸¦ ¼³Á¤ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
writeMethod - »õ·Î¿î write ¸Þ¼­µå
¿¹¿Ü:
IntrospectionException

isBound

public boolean isBound()
¹Ù¿îµå ÇÁ·ÎÆÛƼ¸¦ °»½ÅÇØ, ÇÁ·ÎÆÛƼÀÇ º¯°æ½Ã¿¡ PropertyChange À̺¥Æ®°¡ Æ®¸®°Å µÇµµ·Ï ÇÕ´Ï´Ù.

¹Ýȯ°ª:
¹Ù¿îµå ÇÁ·ÎÆÛƼÀÇ °æ¿ì´Â true

setBound

public void setBound(boolean bound)
¹Ù¿îµå ÇÁ·ÎÆÛƼ¸¦ °»½ÅÇØ, ÇÁ·ÎÆÛƼÀÇ º¯°æ½Ã¿¡ PropertyChange À̺¥Æ®°¡ Æ®¸®°Å µÇµµ·Ï ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
bound - ¹Ù¿îµå ÇÁ·ÎÆÛƼÀÇ °æ¿ì´Â true

isConstrained

public boolean isConstrained()
Á¦¾à ÇÁ·ÎÆÛƼÀÇ °»½ÅÀ» ½ÃµµÇØ ÇÁ·ÎÆÛƼÀÇ º¯°æ½Ã¿¡ VetoableChange À̺¥Æ®°¡ Æ®¸®°Å µÇµµ·Ï ÇÕ´Ï´Ù.

¹Ýȯ°ª:
Á¦¾à ÇÁ·ÎÆÛƼÀÇ °æ¿ì´Â true

setConstrained

public void setConstrained(boolean constrained)
Á¦¾à ÇÁ·ÎÆÛƼÀÇ °»½ÅÀ» ½ÃµµÇØ ÇÁ·ÎÆÛƼÀÇ º¯°æ½Ã¿¡ VetoableChange À̺¥Æ®°¡ Æ®¸®°Å µÇµµ·Ï ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
constrained - Á¦¾à ÇÁ·ÎÆÛƼÀÇ °æ¿ì´Â true

setPropertyEditorClass

public void setPropertyEditorClass(Class <? > propertyEditorClass)
º¸Åë, PropertyEditor´Â PropertyEditorManager¸¦ »ç¿ëÇØ °Ë»öµË´Ï´Ù¸¸, ¾î¶°ÇÑ ÀÌÀ¯¿¡ ÀÇÇØ Æ¯Á¤ÀÇ PropertyEditor¸¦ ÁöÁ¤ ÇÁ·ÎÆÛƼ¿¡ °ü·ÃÁþ°í ½ÍÀº °æ¿ì´Â ÀÌ ¸Þ¼­µå¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.

ÆĶó¹ÌÅÍ:
propertyEditorClass - PropertyEditor Class

getPropertyEditorClass

public Class <? > getPropertyEditorClass()
ÀÌ ÇÁ·ÎÆÛƼÀÇ ¸í½ÃÀûÀÎ µî·ÏÀÌ ³¡³­ PropertyEditor Ŭ·¡½º¸¦ ÃëµæÇÕ´Ï´Ù.

¹Ýȯ°ª:
ÀÌ ÇÁ·ÎÆÛƼÀÇ ¸í½ÃÀûÀÎ µî·ÏÀÌ ³¡³­ PropertyEditor Ŭ·¡½º. ÀϹÝÀûÀ¸·Î Ưº°ÇÑ ¿¡µðÅÍ°¡ µî·ÏµÇÁö ¾Ê±â ¶§¹®¿¡ PropertyEditorManager¸¦ »ç¿ëÇØ ÀûÀýÇÑ PropertyEditor¸¦ °Ë»öÇØ¾ß ÇÏ´Â °ÍÀÎ °ÍÀ» ³ªÅ¸³»´Â nullÀÌ ¸®ÅϵȴÙ

createPropertyEditor

public PropertyEditor  createPropertyEditor(Object  bean)
ÇöÀçÀÇ ÇÁ·ÎÆÛƼ ¿¡µðÅÍ Å¬·¡½º¸¦ »ç¿ëÇØ, ÇÁ·ÎÆÛƼ ¿¡µðÅÍÀÇ ÀνºÅϽº¸¦ ±¸ÃàÇÕ´Ï´Ù.

ÇÁ·ÎÆÛƼ ¿¡µðÅÍ Å¬·¡½º¿¡ Object Àμö¸¦ ÃëÇÏ´Â public »ý¼ºÀÚ°¡ ÀÖ´Â °æ¿ì´Â bean ÆĶó¹ÌÅ͸¦ Àμö·Î¼­ »ç¿ëÇØ È£ÃâÇÕ´Ï´Ù. ±× ¿ÜÀÇ °æ¿ì´Â µðÆúÆ®ÀÇ »ý¼ºÀÚ°¡ È£ÃâµË´Ï´Ù.

ÆĶó¹ÌÅÍ:
bean - ¼Ò½º °´Ã¼
¹Ýȯ°ª:
ÇÁ·ÎÆÛƼ ¿¡µðÅÍ ÀνºÅϽº. ÇÁ·ÎÆÛƼ ¿¡µðÅÍ°¡ Á¤ÀǵǾî ÀÖÁö ¾ÊÀº °æ¿ì, ¶Ç´Â ÀÛ¼ºÇÒ ¼ö ¾ø´Â °æ¿ì´Â null
µµÀÔµÈ ¹öÀü :
1.5

equals

public boolean equals(Object  obj)
PropertyDescriptor¿Í ÁöÁ¤µÈ °´Ã¼¸¦ Á¶ÇÕÇÕ´Ï´Ù. ¾çÀÚ°¡ µî°¡ÀÎ °æ¿ì, true¸¦ ¸®ÅÏÇÕ´Ï´Ù. Àбâ, Ãâ·ÂÇØ, ÇÁ·ÎÆÛƼÀÇ ÇüÅÂ, ÇÁ·ÎÆÛƼ ¿¡µðÅÍ ¹× Ç÷¡±×°¡ µ¿ÀÏÇϸé, 2°³ÀÇ PropertyDescriptor´Â °°½À´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Object ³»ÀÇ equals
ÆĶó¹ÌÅÍ:
obj - ºñ±³ ´ë»óÀÇ ÂüÁ¶ °´Ã¼
¹Ýȯ°ª:
obj Àμö·Î ÁöÁ¤µÈ °´Ã¼¿Í ÀÌ °´Ã¼°¡ µ¿ÀÏÇÑ °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
µµÀÔµÈ ¹öÀü :
1.4
°ü·Ã Ç׸ñ:
Object.hashCode(), Hashtable

hashCode

public int hashCode()
ÀÌ °´Ã¼ÀÇ Çؽà Äڵ尪À» ¸®ÅÏÇÕ´Ï´Ù. ¿ÏÀüÇÑ ¼³¸í¿¡ ´ëÇؼ­´Â Object.hashCode()¸¦ ÂüÁ¶ÇϽʽÿÀ.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Object ³»ÀÇ hashCode
¹Ýȯ°ª:
ÀÌ °´Ã¼ÀÇ Çؽà Äڵ尪
µµÀÔµÈ ¹öÀü :
1.5
°ü·Ã Ç׸ñ:
Object.equals(java.lang.Object), Hashtable

JavaTM 2 Platform
Standard Ed. 5.0

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.