com.yworks.yshrink.model.InvocationFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yguard Show documentation
Show all versions of yguard Show documentation
The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts
package com.yworks.yshrink.model;
import java.util.HashMap;
import java.util.Map;
/**
* @author Michael Schroeder, yWorks GmbH http://www.yworks.com
*/
public class InvocationFactory {
private static final InvocationFactory instance = new InvocationFactory();
protected static InvocationFactory getInstance() {
return instance;
}
private Map invocations = new HashMap();
protected Invocation getInvocation( final int opcode, final String type, final String name, final String desc ) {
String key = new StringBuilder( type ).append( name ).append( desc ).append( opcode ).toString();
Invocation val = invocations.get( key );
if ( null == val ) {
val = new Invocation( opcode, type, name, desc );
invocations.put( key, val );
}
return val;
}
}