protected void parseRequiredPrimaryTypes ( TokenStream tokens , JcrNodeDefinitionTemplate childDefn ) throws ConstraintViolationException { if ( tokens . canConsume ( ' ' ) ) { List < Name > requiredTypes = parseNameList ( tokens ) ; if ( requiredTypes . isEmpty ( ) ) { requiredTypes . add ( JcrNtLexicon . BASE ) ; } childDefn . setRequiredPrimaryTypeNames ( names ( requiredTypes ) ) ; tokens . consume ( ' ' ) ; } }
Parse the child node definition s list of required primary types if they appear next on the token stream .