类 StringSwitcher.Generator
- java.lang.Object
-
- net.sf.cglib.core.AbstractClassGenerator
-
- net.sf.cglib.util.StringSwitcher.Generator
-
- 所有已实现的接口:
ClassGenerator
- 封闭类:
- StringSwitcher
public static class StringSwitcher.Generator extends AbstractClassGenerator
-
-
嵌套类概要
-
从类继承的嵌套类/接口 net.sf.cglib.core.AbstractClassGenerator
AbstractClassGenerator.ClassLoaderData, AbstractClassGenerator.Source
-
-
构造器概要
构造器 构造器 说明 Generator()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringSwitchercreate()Generate theStringSwitcher.protected java.lang.ObjectfirstInstance(java.lang.Class type)voidgenerateClass(org.objectweb.asm.ClassVisitor v)protected java.lang.ClassLoadergetDefaultClassLoader()protected java.lang.ObjectnextInstance(java.lang.Object instance)voidsetFixedInput(boolean fixedInput)Configure how unknown String keys will be handled.voidsetInts(int[] ints)Set the array of integer results.voidsetStrings(java.lang.String[] strings)Set the array of recognized Strings.-
从类继承的方法 net.sf.cglib.core.AbstractClassGenerator
create, generate, getAttemptLoad, getClassLoader, getClassName, getCurrent, getNamingPolicy, getProtectionDomain, getStrategy, getUseCache, setAttemptLoad, setClassLoader, setContextClass, setNamePrefix, setNamingPolicy, setStrategy, setUseCache, unwrapCachedValue, wrapCachedClass
-
-
-
-
方法详细资料
-
setStrings
public void setStrings(java.lang.String[] strings)
Set the array of recognized Strings.- 参数:
strings- the array of String keys; must be the same length as the value array- 另请参阅:
setInts(int[])
-
setInts
public void setInts(int[] ints)
Set the array of integer results.- 参数:
ints- the array of integer results; must be the same length as the key array- 另请参阅:
setStrings(java.lang.String[])
-
setFixedInput
public void setFixedInput(boolean fixedInput)
Configure how unknown String keys will be handled.- 参数:
fixedInput- if false, an unknown key will be returned fromStringSwitcher.intValue(java.lang.String)as-1; if true, the result will be undefined, and the resulting code will be faster
-
getDefaultClassLoader
protected java.lang.ClassLoader getDefaultClassLoader()
-
create
public StringSwitcher create()
Generate theStringSwitcher.
-
generateClass
public void generateClass(org.objectweb.asm.ClassVisitor v) throws java.lang.Exception- 抛出:
java.lang.Exception
-
firstInstance
protected java.lang.Object firstInstance(java.lang.Class type)
- 指定者:
firstInstance在类中AbstractClassGenerator
-
nextInstance
protected java.lang.Object nextInstance(java.lang.Object instance)
- 指定者:
nextInstance在类中AbstractClassGenerator
-
-