Groovy 1.7.0

org.codehaus.groovy.control
Class ResolveVisitor.LowerCaseClass

java.lang.Object
  org.codehaus.groovy.ast.ASTNode
      org.codehaus.groovy.ast.AnnotatedNode
          org.codehaus.groovy.ast.ClassNode
              org.codehaus.groovy.control.ResolveVisitor.LowerCaseClass

class ResolveVisitor.LowerCaseClass
extends ClassNode

we use LowerCaseClass to limit the resolving the compiler does for vanilla names starting with a lower case letter. The idea that if we use a vanilla name with a lower case letter, that this is in most cases no class. If it is a class the class needs to be imported explicitly. The efffect is that in an expression like "def foo = bar" we do not have to use a loadClass call to check the name foo and bar for being classes. Instead we will ask the module for an alias for this name which is much faster.


Field Summary
String className

 
Fields inherited from class ClassNode
clazz, innerClasses, isPrimaryNode, lazyInitLock
 
Constructor Summary
ResolveVisitor.LowerCaseClass(String name)

 
Method Summary
String getName()

boolean hasPackageName()

String setName(String name)

 
Methods inherited from class ClassNode
ClassNode, ClassNode, ClassNode, addConstructor, addConstructor, addField, addField, addFieldFirst, addFieldFirst, addInterface, addMethod, addMethod, addMixin, addObjectInitializerStatements, addProperty, addProperty, addStaticInitializerStatements, addSyntheticMethod, addTransform, declaresInterface, equals, getAbstractMethods, getAllDeclaredMethods, getAllInterfaces, getAnnotations, getAnnotations, getCompileUnit, getComponentType, getDeclaredConstructors, getDeclaredField, getDeclaredMethod, getDeclaredMethods, getDeclaredMethodsMap, getEnclosingMethod, getField, getFields, getGenericsTypes, getGetterMethod, getInnerClasses, getInterfaces, getMethod, getMethods, getMethods, getMixins, getModifiers, getModule, getName, getNameWithoutPackage, getObjectInitializerStatements, getOuterClass, getOuterField, getPackage, getPackageName, getPlainNodeReference, getProperties, getProperty, getSetterMethod, getSuperClass, getTransforms, getTypeClass, getUnresolvedInterfaces, getUnresolvedInterfaces, getUnresolvedName, getUnresolvedSuperClass, getUnresolvedSuperClass, hasDeclaredMethod, hasMethod, hasPackageName, hasPossibleMethod, hasPossibleStaticMethod, hasProperty, hashCode, implementsInterface, isAnnotated, isAnnotationDefinition, isArray, isDerivedFrom, isDerivedFromGroovyObject, isEnum, isGenericsPlaceHolder, isInterface, isPrimaryClassNode, isResolved, isScript, isScriptBody, isStaticClass, isUsingGenerics, makeArray, parametersEqual, positionStmtsAfterEnumInitStmts, redirect, renameField, setAnnotated, setCompileUnit, setEnclosingMethod, setGenericsPlaceHolder, setGenericsTypes, setInterfaces, setModifiers, setModule, setName, setRedirect, setScript, setScriptBody, setStaticClass, setSuperClass, setUnresolvedSuperClass, setUsingGenerics, toString, tryFindPossibleMethod, visitContents
 
Methods inherited from class AnnotatedNode
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, isSynthetic, setDeclaringClass, setSynthetic
 
Methods inherited from class ASTNode
getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setSourcePosition, visit
 
Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Field Detail

className

String className


 
Constructor Detail

ResolveVisitor.LowerCaseClass

public ResolveVisitor.LowerCaseClass(String name)


 
Method Detail

getName

public String getName()


hasPackageName

public boolean hasPackageName()


setName

public String setName(String name)


 

Copyright © 2003-2009 The Codehaus. All rights reserved.