private IdentifierImpl createIdentifierForSubExpression ( String subExpression , String fullExpression , boolean isLocationStep , boolean isLastStep ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "createIdentifierForSubExpression" , "subExpression: " + subExpression + ", isLocStep: " + new Boolean ( isLocationStep ) + ", isLastStep: " + new Boolean ( isLocationStep ) ) ; IdentifierImpl stepIdentifier = new IdentifierImpl ( subExpression ) ; // Set the full name into the identifier stepIdentifier . setFullName ( fullExpression ) ; // bump the locationStep if we're not dealing with a predicate if ( isLocationStep ) locationStep ++ ; // Set the appropriate XPath parameters for this Identifier setXPathCharacteristics ( stepIdentifier ) ; // Set the type to child if not the last step if ( ! isLastStep ) stepIdentifier . setType ( Selector . CHILD ) ; else stepIdentifier . setType ( Selector . BOOLEAN ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . exit ( this , cclass , "createIdentifierForSubExpression" , stepIdentifier ) ; return stepIdentifier ; }
When we ve isolated a subexpression we wrap it in an Identifier .