@Override boolean isAttributeExpr(ExpressionNodeBase e) { // Determine if e is part of an attribute expression; it is if e is the rhs // of the NamespaceAccessExpression, and the NamespaceAccessExpression is // part of an attribute expression if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.isAttributeExpr(this); } return false; }
@Override ExpressionNodeBase getBaseForMemberRef(ExpressionNodeBase e) { // Get the ExpressionNodeBase representing the Base of a Member access // expression. This would be the Node for 'a' in the expression 'a.c::b', // assuming you asked for the base of 'b'. if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.getBaseForMemberRef(this); } return null; }
@Override boolean isAttributeExpr(ExpressionNodeBase e) { // Determine if e is part of an attribute expression; it is if e is the rhs // of the NamespaceAccessExpression, and the NamespaceAccessExpression is // part of an attribute expression if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.isAttributeExpr(this); } return false; }
@Override ExpressionNodeBase getBaseForMemberRef(ExpressionNodeBase e) { // Get the ExpressionNodeBase representing the Base of a Member access // expression. This would be the Node for 'a' in the expression 'a.c::b', // assuming you asked for the base of 'b'. if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.getBaseForMemberRef(this); } return null; }
@Override boolean isPartOfMemberRef(ExpressionNodeBase e) { // Determine if the expression passed in is part of a Member Reference. In // this case, we return true if the expression is the rhs of the // NamesapceAccessExpression and the NamespaceAccessExpression is part of a // member reference. The node for b in a.c::b would return true if // passed to this method. if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.isPartOfMemberRef(this); } return false; }
@Override boolean isPartOfMemberRef(ExpressionNodeBase e) { // Determine if the expression passed in is part of a Member Reference. In // this case, we return true if the expression is the rhs of the // NamesapceAccessExpression and the NamespaceAccessExpression is part of a // member reference. The node for b in a.c::b would return true if // passed to this method. if (e == this.rightOperandNode) { ExpressionNodeBase p = getParentExpression(); if (p != null) return p.isPartOfMemberRef(this); } return false; }