Class StringCachedClass
java.lang.Object
org.codehaus.groovy.reflection.CachedClass
org.codehaus.groovy.reflection.stdclasses.StringCachedClass
-
Nested Class Summary
Nested classes/interfaces inherited from class org.codehaus.groovy.reflection.CachedClass
CachedClass.CachedMethodComparatorByName, CachedClass.CachedMethodComparatorWithString -
Field Summary
Fields inherited from class org.codehaus.groovy.reflection.CachedClass
classInfo, EMPTY_ARRAY, isArray, isInterface, isNumber, isPrimitive, modifiers, mopMethods -
Constructor Summary
ConstructorsConstructorDescriptionStringCachedClass(ClassInfo classInfo) Constructs a cached class representation forString. -
Method Summary
Modifier and TypeMethodDescriptioncoerceArgument(Object argument) Coerces the given argument toString.booleanisAssignableFrom(Class classToTransformFrom) Determines if the given class can be transformed toString.booleanisDirectlyAssignable(Object argument) Checks if the given argument is directly assignable toString.Methods inherited from class org.codehaus.groovy.reflection.CachedClass
addNewMopMethods, getCachedClass, getCachedSuperClass, getCallSiteLoader, getConstructors, getDeclaredInterfaces, getFields, getHierarchy, getInterfaces, getMethods, getModifiers, getName, getNewMetaMethods, getSuperClassDistance, getTheClass, getTypeDescription, hashCode, isInterface, isPrimitive, isVoid, searchMethods, setNewMopMethods, toString
-
Constructor Details
-
Method Details
-
isDirectlyAssignable
Checks if the given argument is directly assignable toString.- Overrides:
isDirectlyAssignablein classCachedClass- Parameters:
argument- the argument to check- Returns:
trueif the argument is an instance ofString,falseotherwise
-
isAssignableFrom
Determines if the given class can be transformed toString. Acceptsnull,String, andGStringsubtypes.- Overrides:
isAssignableFromin classCachedClass- Parameters:
classToTransformFrom- the source class to check- Returns:
trueif the class can be transformed toString,falseotherwise
-
coerceArgument
- Overrides:
coerceArgumentin classCachedClass- Parameters:
argument- the argument to coerce- Returns:
- the argument as a
String, or the original argument if not aGString
-