org.jvnet.hk2.internal
Class TypeChecker
java.lang.Object
org.jvnet.hk2.internal.TypeChecker
public class TypeChecker
- extends Object
This class contains various utilities for ensuring
java type safety
- Author:
- jwells
Method Summary |
static boolean |
isTypeSafe(Type requiredType,
Type beanType)
Returns true if the given requiredType is safely assignable
from the given beanType. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeChecker
public TypeChecker()
isTypeSafe
public static boolean isTypeSafe(Type requiredType,
Type beanType)
- Returns true if the given requiredType is safely assignable
from the given beanType. In otherwords, if
requiredType = beanType
without any cast
- Parameters:
requiredType
- The type being assigned intobeanType
- the type being assigned
- Returns:
- true if things are type safe
Copyright © 2013 Oracle Corporation. All Rights Reserved.