Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.logging.log4j.core.util
Class TypeUtil

    java.lang.Object
      org.apache.logging.log4j.core.util.TypeUtil

    public final class TypeUtil

extends Object

Utility class for working with Java `Type`s and derivatives. This class is adapted heavily from the Spring Framework, specifically the TypeUtils class.

Since:
  2.1
See Also:
  `Type`, `GenericArrayType`, `ParameterizedType`, `WildcardType`, `Class`

Method Summary
`static boolean` | `isAssignable(Type lhs, Type rhs)` Indicates if two `Type`s are assignment compatible.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### isAssignable

    public static boolean isAssignable(Type lhs,
                                       Type rhs)

  Indicates if two `Type`s are assignment compatible.

  Parameters:
    `lhs` - the left hand side to check assignability to
    `rhs` - the right hand side to check assignability from
  Returns:
    `true` if it is legal to assign a variable of type `rhs` to a variable of type `lhs`
  See Also:
    `Class.isAssignableFrom(Class)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.