Package org.springframework.cglib.util
Class StringSwitcher.Generator
java.lang.Object
org.springframework.cglib.core.AbstractClassGenerator
org.springframework.cglib.util.StringSwitcher.Generator
- All Implemented Interfaces:
- ClassGenerator
- Enclosing class:
- StringSwitcher
- 
Nested Class SummaryNested classes/interfaces inherited from class org.springframework.cglib.core.AbstractClassGeneratorAbstractClassGenerator.ClassLoaderData, AbstractClassGenerator.Source
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncreate()Generate theStringSwitcher.protected ObjectfirstInstance(Class type) voidprotected ClassLoaderprotected ObjectnextInstance(Object instance) voidsetFixedInput(boolean fixedInput) Configure how unknown String keys will be handled.voidsetInts(int[] ints) Set the array of integer results.voidsetStrings(String[] strings) Set the array of recognized Strings.Methods inherited from class org.springframework.cglib.core.AbstractClassGeneratorcreate, generate, getAttemptLoad, getClassLoader, getClassName, getCurrent, getNamingPolicy, getProtectionDomain, getStrategy, getUseCache, setAttemptLoad, setClassLoader, setContextClass, setNamePrefix, setNamingPolicy, setStrategy, setUseCache, unwrapCachedValue, wrapCachedClass
- 
Constructor Details- 
Generatorpublic Generator()
 
- 
- 
Method Details- 
setStringsSet the array of recognized Strings.- Parameters:
- strings- the array of String keys; must be the same length as the value array
- See Also:
 
- 
setIntspublic void setInts(int[] ints) Set the array of integer results.- Parameters:
- ints- the array of integer results; must be the same length as the key array
- See Also:
 
- 
setFixedInputpublic void setFixedInput(boolean fixedInput) Configure how unknown String keys will be handled.- Parameters:
- fixedInput- if false, an unknown key will be returned from- StringSwitcher.intValue(java.lang.String)as- -1; if true, the result will be undefined, and the resulting code will be faster
 
- 
getDefaultClassLoader- Specified by:
- getDefaultClassLoaderin class- AbstractClassGenerator
 
- 
createGenerate theStringSwitcher.
- 
generateClass- Throws:
- Exception
 
- 
firstInstance- Specified by:
- firstInstancein class- AbstractClassGenerator
 
- 
nextInstance- Specified by:
- nextInstancein class- AbstractClassGenerator
 
 
-