本文整理汇总了Java中org.springframework.cglib.core.Signature类的典型用法代码示例。如果您正苦于以下问题:Java Signature类的具体用法?Java Signature怎么用?Java Signature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Signature类属于org.springframework.cglib.core包,在下文中一共展示了Signature类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: generateClass
import org.springframework.cglib.core.Signature; //导入依赖的package包/类
public void generateClass(ClassVisitor v) throws Exception {
ClassEmitter ce = new ClassEmitter(v);
ce.begin_class(Constants.V1_6,
Constants.ACC_PUBLIC | Constants.ACC_SUPER | Constants.ACC_INTERFACE,
getClassName(),
null,
null,
Constants.SOURCE_FILE);
for (Iterator it = signatures.keySet().iterator(); it.hasNext();) {
Signature sig = (Signature)it.next();
Type[] exceptions = (Type[])signatures.get(sig);
ce.begin_method(Constants.ACC_PUBLIC | Constants.ACC_ABSTRACT,
sig,
exceptions).end_method();
}
ce.end_class();
}
开发者ID:yngui,项目名称:jephyr,代码行数:18,代码来源:InterfaceMaker.java
示例2: emitConstructors
import org.springframework.cglib.core.Signature; //导入依赖的package包/类
private void emitConstructors(ClassEmitter ce, List constructors) {
boolean seenNull = false;
for (Iterator it = constructors.iterator(); it.hasNext();) {
MethodInfo constructor = (MethodInfo)it.next();
CodeEmitter e = EmitUtils.begin_method(ce, constructor, Constants.ACC_PUBLIC);
e.load_this();
e.dup();
e.load_args();
Signature sig = constructor.getSignature();
seenNull = seenNull || sig.getDescriptor().equals("()V");
e.super_invoke_constructor(sig);
e.invoke_static_this(BIND_CALLBACKS);
if (!interceptDuringConstruction) {
e.load_this();
e.push(1);
e.putfield(CONSTRUCTED_FIELD);
}
e.return_value();
e.end_method();
}
if (!classOnly && !seenNull && arguments == null)
throw new IllegalArgumentException("Superclass has no null constructors but no arguments were given");
}
开发者ID:yngui,项目名称:jephyr,代码行数:24,代码来源:Enhancer.java
示例3: create
import org.springframework.cglib.core.Signature; //导入依赖的package包/类
/**
* For internal use by {@link Enhancer} only; see the {@link net.sf.cglib.reflect.FastMethod} class
* for similar functionality.
*/
public static MethodProxy create(Class c1, Class c2, String desc, String name1, String name2) {
MethodProxy proxy = new MethodProxy();
proxy.sig1 = new Signature(name1, desc);
proxy.sig2 = new Signature(name2, desc);
proxy.createInfo = new CreateInfo(c1, c2);
return proxy;
}
开发者ID:yngui,项目名称:jephyr,代码行数:12,代码来源:MethodProxy.java
示例4: getSignature
import org.springframework.cglib.core.Signature; //导入依赖的package包/类
/**
* Return the signature of the proxied method.
*/
public Signature getSignature() {
return sig1;
}
开发者ID:yngui,项目名称:jephyr,代码行数:7,代码来源:MethodProxy.java
示例5: rename
import org.springframework.cglib.core.Signature; //导入依赖的package包/类
private Signature rename(Signature sig, int index) {
return new Signature("CGLIB$" + sig.getName() + "$" + index,
sig.getDescriptor());
}
开发者ID:yngui,项目名称:jephyr,代码行数:5,代码来源:Enhancer.java
示例6: add
import org.springframework.cglib.core.Signature; //导入依赖的package包/类
/**
* Add a method signature to the interface.
* @param sig the method signature to add to the interface
* @param exceptions an array of exception types to declare for the method
*/
public void add(Signature sig, Type[] exceptions) {
signatures.put(sig, exceptions);
}
开发者ID:yngui,项目名称:jephyr,代码行数:9,代码来源:InterfaceMaker.java
注:本文中的org.springframework.cglib.core.Signature类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论