Package com.ms.object
 In this topic

*Methods

 

Packages
  PreviousThis PackageNext
Package com.ms.object   Previous This
Package
Next

 


Interface MetaObject

public interface MetaObject
{
  // Methods
  public Object getObject(Category category, Class cls);
  public boolean hasObject(Category category, Class cls);
  public Enumeration objectCategories();
  public Enumeration objectClasses(Category category);
}

This interface defines an abstraction for an object that has multiple identities. A class that implements the MetaObject interface can be used to represent data that is being transferred.

Methods

getObject

public Object getObject(Category category, Class cls);

Retrieves an object instance that matches the specified Category and Class objects. Either one (but not both) of the parameters can be null.

Return Value:

Returns an object that matches the specified Category and Class; returns null if no matching object is available.

ParameterDescription
category The Category of the requested object. If a null Category object is specified, the Category is derived from the name of the specified class.
cls The Class of the requested object. If a null Class is specified, the request is for any object in the specified category.

hasObject

public boolean hasObject(Category category, Class cls);

Determines whether the specified Category and Class are supported by the MetaObject. Either one (but not both) of the parameters can be null.

Return Value:

Returns true if an object that matches the specified Category and Class is available; otherwise, returns false.

ParameterDescription
category The Category that is requested. If a null Category object is specified, the category is derived from the name of the specified class.
cls The Class that is requested. If a null Class is specified, the request is for any class in the specified category.

objectCategories

public Enumeration objectCategories();

Enumerates the categories that are supported by the MetaObject.

Return Value:

Returns an Enumeration of the Category objects that are supported.

objectClasses

public Enumeration objectClasses(Category category);

Enumerates the classes that are used to describe the specified category.

Return Value:

Returns an Enumeration of Class objects in the specified Category that are supported by the MetaObject.

ParameterDescription
category The Category to enumerate Class objects from.

upnrm.gif