Package org.codehaus.groovy.vmplugin.v8
Class TypeHelper
java.lang.Object
org.codehaus.groovy.vmplugin.v8.TypeHelper
public class TypeHelper
extends java.lang.Object
This class contains helper methods for converting and comparing types.
 WARNING: This class is for internal use only. do not use it outside of its
 package and not outside groovy-core.
- 
Constructor SummaryConstructors Constructor Description TypeHelper()
- 
Method SummaryModifier and Type Method Description protected static booleanargumentClassIsParameterClass(java.lang.Class<?> argumentClass, java.lang.Class<?> parameterClass)Realizes an unsharp equal for the class.protected static java.lang.Class<?>getWrapperClass(java.lang.Class<?> c)Get wrapper class for a given class.protected static booleanisBigDecCategory(java.lang.Class<?> x)protected static booleanisDoubleCategory(java.lang.Class<?> x)protected static booleanisIntCategory(java.lang.Class<?> x)protected static booleanisLongCategory(java.lang.Class<?> x)protected static java.lang.invoke.MethodTypereplaceWithMoreSpecificType(java.lang.Object[] args, java.lang.invoke.MethodType callSiteType)Replaces the types in the callSiteType parameter if more specific types given through the arguments.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
- 
Constructor Details- 
TypeHelperpublic TypeHelper()
 
- 
- 
Method Details- 
getWrapperClassprotected static java.lang.Class<?> getWrapperClass(java.lang.Class<?> c)Get wrapper class for a given class. If the class is for a primitive number type, then the wrapper class will be returned. If it is no primitive number type, we return the class itself.
- 
argumentClassIsParameterClassprotected static boolean argumentClassIsParameterClass(java.lang.Class<?> argumentClass, java.lang.Class<?> parameterClass)Realizes an unsharp equal for the class. In general we return true if the provided arguments are the same. But we will also return true if our argument class is a wrapper for the parameter class. For example the parameter is an int and the argument class is a wrapper.
- 
replaceWithMoreSpecificTypeprotected static java.lang.invoke.MethodType replaceWithMoreSpecificType(java.lang.Object[] args, java.lang.invoke.MethodType callSiteType)Replaces the types in the callSiteType parameter if more specific types given through the arguments. This is in general the case, unless the argument is null.
- 
isIntCategoryprotected static boolean isIntCategory(java.lang.Class<?> x)
- 
isLongCategoryprotected static boolean isLongCategory(java.lang.Class<?> x)
- 
isBigDecCategoryprotected static boolean isBigDecCategory(java.lang.Class<?> x)
- 
isDoubleCategoryprotected static boolean isDoubleCategory(java.lang.Class<?> x)
 
-