Package net.karneim.pojobuilder.model
Class PropertyM
- java.lang.Object
-
- net.karneim.pojobuilder.model.PropertyM
-
public class PropertyM extends java.lang.Object
-
-
Method Summary
-
-
-
Constructor Detail
-
PropertyM
public PropertyM(java.lang.String propertyName, TypeM propertyType)
-
-
Method Detail
-
getPropertyType
public TypeM getPropertyType()
-
getPropertyName
public java.lang.String getPropertyName()
-
isField
public boolean isField()
-
getWithMethodName
public java.lang.String getWithMethodName()
-
withMethodNamePattern
public PropertyM withMethodNamePattern(java.lang.String methodNamePattern)
-
isOptionalProperty
public boolean isOptionalProperty(OptionalM optional)
-
getBasicPropertyType
public TypeM getBasicPropertyType(OptionalM optional)
Returns the basic type of this property. If the property is an optional property in regard to the specified optionalType, then the basic type is defined as the generic type parameter of the optional type. Otherwise, the basic type is the property type itself.- Parameters:
optional- the Optional defined inGeneratePojoBuilder.withOptionalProperties()- Returns:
- the basic type of this property
-
getParameterizedBuilderInterfaceType
public TypeM getParameterizedBuilderInterfaceType(TypeM interfaceType, OptionalM optional)
-
getOptionalPropertyType
public TypeM getOptionalPropertyType(OptionalM optional)
TheTypeMfor an optional property with the property type as it's type parameter or the property type if that is already an optional type.- Parameters:
optional- the Optional defined inGeneratePojoBuilder.withOptionalProperties()- Returns:
- a
TypeMfor an optional property with the property type as it's type parameter or the property type if that is already an optional type
-
getConstructorParameter
public ConstructorParameterM getConstructorParameter()
-
writableVia
public PropertyM writableVia(ConstructorParameterM constructorParameter)
-
isWritableViaConstructor
public boolean isWritableViaConstructor()
-
writableVia
public PropertyM writableVia(SetterMethodM setterMethod)
-
getSetterMethod
public SetterMethodM getSetterMethod()
-
isWritableViaSetterMethod
public boolean isWritableViaSetterMethod()
-
getGetterMethod
public MethodM getGetterMethod()
-
isReadableViaGetterMethod
public boolean isReadableViaGetterMethod()
-
accessibleVia
public PropertyM accessibleVia(FieldAccessM fieldAccess)
-
getFieldAccess
public FieldAccessM getFieldAccess()
-
isAccessibleViaFieldAccess
public boolean isAccessibleViaFieldAccess()
-
getFactoryMethodParameter
public FactoryMethodParameterM getFactoryMethodParameter()
-
writableVia
public PropertyM writableVia(FactoryMethodParameterM param)
-
isWritableViaFactoryMethod
public boolean isWritableViaFactoryMethod()
-
isWritableViaSetterMethodBy
public boolean isWritableViaSetterMethodBy(TypeM accessingClass)
-
isWritableViaFieldAccessBy
public boolean isWritableViaFieldAccessBy(TypeM accessingClass)
-
isWritableBy
public boolean isWritableBy(TypeM accessingClass)
-
isReadableViaGetterMethodBy
public boolean isReadableViaGetterMethodBy(TypeM accessingClass)
-
isReadableViaFieldAccessBy
public boolean isReadableViaFieldAccessBy(TypeM accessingClass)
-
getValueFieldName
public java.lang.String getValueFieldName()
-
getIsSetFieldName
public java.lang.String getIsSetFieldName()
-
getBuilderFieldName
public java.lang.String getBuilderFieldName()
-
getCallTo
public java.lang.String getCallTo(BuildMethodM buildMethod)
-
getPreferredWriteAccessFor
public WriteAccess getPreferredWriteAccessFor(TypeM accessingClass)
-
matchesAnyOf
public boolean matchesAnyOf(java.util.List<PropertyPattern> list)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-