org.beanfabrics.meta
Class TypeInfo

java.lang.Object
  extended by org.beanfabrics.meta.TypeInfo

public class TypeInfo
extends java.lang.Object

The TypeInfo represents the structural meta data of a specific PresentationModel class.


Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Class<? extends PresentationModel> getJavaType()
          Returns the Java type of the model class.
 java.lang.String getName()
          Returns the Java classname of the model class.
 java.util.Collection<PropertyInfo> getProperties()
          Returns an unmodifiable collection of all properties belonging to in this type info.
 PropertyInfo getProperty(java.lang.String name)
          Returns the PropertyInfo for the property with the given name.
 int hashCode()
           
 boolean hasProperties()
          Returns whether this type info contains any properties.
 boolean isAssignableFrom(TypeInfo otherTypeInfo)
          Returns whether the Java type of this type info is assignable from the Java type of the given other type info.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getJavaType

public java.lang.Class<? extends PresentationModel> getJavaType()
Returns the Java type of the model class.

Returns:
the Java type of the model class

getName

public java.lang.String getName()
Returns the Java classname of the model class.

Returns:
the Java classname of the model class

getProperties

public java.util.Collection<PropertyInfo> getProperties()
Returns an unmodifiable collection of all properties belonging to in this type info.

Returns:
an unmodifiable collection of all properties

hasProperties

public boolean hasProperties()
Returns whether this type info contains any properties.

Returns:
true if this type info contains any properties, otherwise false.

getProperty

public PropertyInfo getProperty(java.lang.String name)
Returns the PropertyInfo for the property with the given name.

Parameters:
name - the name of the property
Returns:
the PropertyInfo for the property with the given name, or null if this type info contains no property with that name.

isAssignableFrom

public boolean isAssignableFrom(TypeInfo otherTypeInfo)
Returns whether the Java type of this type info is assignable from the Java type of the given other type info.

The result of this method is true only if this.getJavaType().isAssignableFrom(otherModelType.getJavaType()).

Parameters:
otherTypeInfo -
Returns:
whether the Java type of this type info is assignable from the Java type of the given other type info

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object