/* Note: An alias node, having an AML_ALIAS_OP, can be resolved to a method definition. This function doesn't handle this case. */
BOOLEAN EFIAPI AmlIsMethodDefinitionNode(IN CONST AML_OBJECT_NODE *Node)
/* Note: An alias node, having an AML_ALIAS_OP, can be resolved to a method definition. This function doesn't handle this case. */
BOOLEAN EFIAPI AmlIsMethodDefinitionNode(IN CONST AML_OBJECT_NODE *Node)
{
  AML_DATA_NODE  *ObjectType;
  if (AmlNodeCompareOpCode (Node, AML_METHOD_OP, 0)) {
    return TRUE;
  } else if (AmlNodeCompareOpCode (Node, AML_EXTERNAL_OP, 0)) {
    ObjectType = (AML_DATA_NODE *)AmlGetFixedArgument (
                                    (AML_OBJECT_NODE *)Node,
                                    EAmlParseIndexTerm1
                                    );
    if (IS_AML_DATA_NODE (ObjectType)                   &&
        (ObjectType->DataType == EAmlNodeDataTypeUInt)  &&
        ((ObjectType->Size == 1)))
    {
      if (*((UINT8 *)ObjectType->Buffer) == (UINT8)EAmlObjTypeMethodObj) {
        return TRUE;
      } else {
        return FALSE;
      }
    } else {
      ASSERT (0);
      return FALSE;
    }
  }
  return FALSE;
}