接口 NamingPolicy
-
- 所有已知实现类:
DefaultNamingPolicy
public interface NamingPolicyCustomize the generated class name forAbstractClassGenerator-based utilities.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 booleanequals(java.lang.Object o)TheNamingPolicyin use does not currently, but may in the future, affect the caching of classes generated byAbstractClassGenerator, so this is a reminder that you should correctly implementequalsandhashCodeto avoid generating too many classes.java.lang.StringgetClassName(java.lang.String prefix, java.lang.String source, java.lang.Object key, Predicate names)Choose a name for a generated class.
-
-
-
方法详细资料
-
getClassName
java.lang.String getClassName(java.lang.String prefix, java.lang.String source, java.lang.Object key, Predicate names)Choose a name for a generated class.- 参数:
prefix- a dotted-name chosen by the generating class (possibly to put the generated class in a particular package)source- the fully-qualified class name of the generating class (for example "net.sf.cglib.Enhancer")key- A key object representing the state of the parameters; for caching to work properly, equal keys should result in the same generated class name. The default policy incorporateskey.hashCode()into the class name.names- a predicate that returns true if the given classname has already been used in the same ClassLoader.- 返回:
- the fully-qualified class name
-
equals
boolean equals(java.lang.Object o)
TheNamingPolicyin use does not currently, but may in the future, affect the caching of classes generated byAbstractClassGenerator, so this is a reminder that you should correctly implementequalsandhashCodeto avoid generating too many classes.- 覆盖:
equals在类中java.lang.Object
-
-