Package org.joda.beans.impl
Class BasicMetaProperty<P>
- java.lang.Object
-
- org.joda.beans.impl.BasicMetaProperty<P>
-
- Type Parameters:
P
- the type of the property content
- All Implemented Interfaces:
MetaProperty<P>
- Direct Known Subclasses:
DirectMetaProperty
,StandaloneMetaProperty
public abstract class BasicMetaProperty<P> extends Object implements MetaProperty<P>
An abstract base meta-property.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BasicMetaProperty(String propertyName)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Checks if this meta-property equals another.int
hashCode()
Returns a suitable hash code.String
name()
Gets the property name.String
toString()
Returns a string that summarises the meta-property.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.joda.beans.MetaProperty
annotation, annotationOpt, annotations, createProperty, declaringType, get, getString, getString, metaBean, propertyGenericType, propertyType, put, set, setString, setString, style
-
-
-
-
Constructor Detail
-
BasicMetaProperty
protected BasicMetaProperty(String propertyName)
Constructor.- Parameters:
propertyName
- the property name, not empty
-
-
Method Detail
-
name
public String name()
Description copied from interface:MetaProperty
Gets the property name.The JavaBean style methods getFoo() and setFoo() will lead to a property name of 'foo' and so on.
- Specified by:
name
in interfaceMetaProperty<P>
- Returns:
- the name of the property, not empty
-
equals
public boolean equals(Object obj)
Description copied from interface:MetaProperty
Checks if this meta-property equals another.This compares the property name and declaring type. It does not compare the property or bean types.
- Specified by:
equals
in interfaceMetaProperty<P>
- Overrides:
equals
in classObject
- Parameters:
obj
- the other meta-property, null returns false- Returns:
- true if equal
-
hashCode
public int hashCode()
Description copied from interface:MetaProperty
Returns a suitable hash code.- Specified by:
hashCode
in interfaceMetaProperty<P>
- Overrides:
hashCode
in classObject
- Returns:
- the hash code
-
-