Package cn.dinodev.spring.commons.bean
Class Property
java.lang.Object
cn.dinodev.spring.commons.bean.Property
- Author:
- Cody Lu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe property AnnotationsgetField()The property Field: e.g.org.springframework.core.MethodParameterThe method parameter for the property getter or setter method: e.g.getName()The name of the property: e.g.Class<?>The object declaring this property, either directly or in a superclass the object extends.<A extends Annotation>
AgetReadAnnotation(Class<A> annotationType) The property Annotation on getter methodThe property getter method: e.g.org.springframework.core.ResolvableTypeThe ResolvableType property type.Class<?>getType()The property type: e.g.<A extends Annotation>
AgetWriteAnnotation(Class<A> annotationType) The property Annotation on setter methodThe property setter method: e.g.inthashCode()booleanThe property is readable.booleanisReadableInJsonView(Class<?> activeView) is the property readable && visible in the given view.booleanisVisiableInJsonView(Class<?> activeView) The property is readable or writable in given view.booleanThe property is writable.booleanisWritableInJsonView(Class<?> activeView) is the property writable && visible in the given view.
-
Constructor Details
-
Property
-
Property
-
-
Method Details
-
getObjectType
The object declaring this property, either directly or in a superclass the object extends.- Returns:
- the object type
-
getName
The name of the property: e.g. 'foo'- Returns:
- the name of the property
-
getType
The property type: e.g.java.lang.String- Returns:
- the property type
-
getResolvableType
public org.springframework.core.ResolvableType getResolvableType()The ResolvableType property type.- Returns:
- the ResolvableType property type
-
getReadMethod
The property getter method: e.g.getFoo()- Returns:
- the property getter method, or null if not found
-
getWriteMethod
The property setter method: e.g.setFoo(String)- Returns:
- the property setter method, or null if not found
-
getField
The property Field: e.g.String foo;- Returns:
- the property Field, or null if not found
-
isReadable
public boolean isReadable()The property is readable.- Returns:
- true if the property is readable
-
isWritable
public boolean isWritable()The property is writable.- Returns:
- true if the property is writable
-
isVisiableInJsonView
The property is readable or writable in given view.- Parameters:
activeView- active jsonView- Returns:
- true if the property is readable or writable in given view
-
isReadableInJsonView
is the property readable && visible in the given view.- Parameters:
activeView- active jsonView- Returns:
- true if the property is readable and visible in the given view.
-
isWritableInJsonView
is the property writable && visible in the given view.- Parameters:
activeView- active jsonView- Returns:
- true if the property is writable and visible in the given view.
-
getMethodParameter
public org.springframework.core.MethodParameter getMethodParameter()The method parameter for the property getter or setter method: e.g.MethodParameter(getFoo())- Returns:
- the method parameter for the property getter or setter method
-
getAnnotations
The property Annotations- Returns:
- the property Annotations on the getter/setter method or field
-
getReadAnnotation
The property Annotation on getter method- Parameters:
annotationType- the annotation type- Returns:
- the property Annotation on getter method or field
-
getWriteAnnotation
The property Annotation on setter method- Parameters:
annotationType- the annotation type- Returns:
- the property Annotation on setter method or field
-
equals
-
hashCode
public int hashCode()
-