com.sun.syndication.feed.impl
クラス ObjectBean

java.lang.Object
  上位を拡張 com.sun.syndication.feed.impl.ObjectBean
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Cloneable

public class ObjectBean
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Convenience class providing clone(), toString(), equals() and hashCode() functionality for Java Beans.

It works on all read/write properties, recursively.

It uses the CloneableBean, EqualsBean and ToStringBean classes in a delegation pattern.

ObjectBean programming conventions

All ObjectBean subclasses having properties that return collections they should never return null if the property has been set to null or if a collection has not been set. They should create and return an empty collection, this empty collection instance should also be set to the corresponding property.

All ObjectBean subclasses properties should be live references.

関連項目:
直列化された形式

コンストラクタの概要
ObjectBean(java.lang.Class beanClass, java.lang.Object obj)
          Constructor.
ObjectBean(java.lang.Class beanClass, java.lang.Object obj, java.util.Set ignoreProperties)
          Constructor.
 
メソッドの概要
 java.lang.Object clone()
          Creates a deep 'bean' clone of the object.
 boolean equals(java.lang.Object other)
          Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
 int hashCode()
          Returns a hashcode value for the object.
 java.lang.String toString()
          Returns the String representation for the object.
 
クラス java.lang.Object から継承されたメソッド
finalize, getClass, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

ObjectBean

public ObjectBean(java.lang.Class beanClass,
                  java.lang.Object obj)
Constructor.

パラメータ:
beanClass - the class/interface to be used for property scanning.

ObjectBean

public ObjectBean(java.lang.Class beanClass,
                  java.lang.Object obj,
                  java.util.Set ignoreProperties)
Constructor.

The property names in the ignoreProperties Set will not be copied into the cloned instance. This is useful for cases where the Bean has convenience properties (properties that are actually references to other properties or properties of properties). For example SyndFeed and SyndEntry beans have convenience properties, publishedDate, author, copyright and categories all of them mapped to properties in the DC Module.

パラメータ:
beanClass - the class/interface to be used for property scanning.
ignoreProperties - properties to ignore when cloning.
メソッドの詳細

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates a deep 'bean' clone of the object.

オーバーライド:
クラス java.lang.Object 内の clone
戻り値:
a clone of the object.
例外:
java.lang.CloneNotSupportedException - thrown if an element of the object cannot be cloned.

equals

public boolean equals(java.lang.Object other)
Indicates whether some other object is "equal to" this one as defined by the Object equals() method.

オーバーライド:
クラス java.lang.Object 内の equals
パラメータ:
other - he reference object with which to compare.
戻り値:
true if 'this' object is equal to the 'other' object.

hashCode

public int hashCode()
Returns a hashcode value for the object.

It follows the contract defined by the Object hashCode() method.

オーバーライド:
クラス java.lang.Object 内の hashCode
戻り値:
the hashcode of the bean object.

toString

public java.lang.String toString()
Returns the String representation for the object.

オーバーライド:
クラス java.lang.Object 内の toString
戻り値:
String representation for the object.