protected void parsePropertyType ( TokenStream tokens , JcrPropertyDefinitionTemplate propDefn , String defaultPropertyType ) { if ( tokens . canConsume ( ' ' ) ) { // Parse the (optional) property type ... String propertyType = defaultPropertyType ; if ( tokens . matchesAnyOf ( VALID_PROPERTY_TYPES ) ) { propertyType = tokens . consume ( ) ; if ( "*" . equals ( propertyType ) ) propertyType = "UNDEFINED" ; } tokens . consume ( ' ' ) ; PropertyType type = PropertyType . valueFor ( propertyType . toLowerCase ( ) ) ; int jcrType = PropertyTypeUtil . jcrPropertyTypeFor ( type ) ; propDefn . setRequiredType ( jcrType ) ; } }
Parse the property type if a valid one appears next on the token stream .