org.jvnet.hk2.internal
Class TypeChecker

java.lang.Object
  extended by org.jvnet.hk2.internal.TypeChecker

public class TypeChecker
extends Object

This class contains various utilities for ensuring java type safety

Author:
jwells

Constructor Summary
TypeChecker()
           
 
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
 

Constructor Detail

TypeChecker

public TypeChecker()
Method Detail

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 into
beanType - the type being assigned
Returns:
true if things are type safe


Copyright © 2013 Oracle Corporation. All Rights Reserved.