Package: groovy.util

## [Java] Class Node

- groovy.util.Node

-     public class Node
      extends Object

  GDK enhancements for Node.

  displayName:
    Node
  receiverFqcn:
    groovy.util.Node

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `<T>` | `public T` | `asType(Class<T> type)` Enables `node as Type` coercion for XML Nodes.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `addShutdownHook, any, any, asBoolean, asType, clamp, clamp, collect, collect, collect, dump, each, eachMatch, eachMatch, eachWithIndex, every, every, find, find, findAll, findAll, findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf, findLastIndexOf, findResult, findResult, findResult, findResult, getAt, getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty, identity, inject, inject, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, sleep, sleep, split, sprintf, sprintf, stream, takeIf, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits`

- - ### Method Detail

    - #### <T> public T asType(Class<T> type)

      Enables `node as Type` coercion for XML Nodes. Converts the Node to a Map via Node.toMap and then uses Groovy's standard Map coercion to produce the typed object. Does not require Jackson on the classpath.

      Parameters:
        `type` - the target type
      Type Parameters:
        `T` - the target type
      Returns:
        a typed object
      Since:
        6.0.0