All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yworks.yshrink.model.InvocationFactory Maven / Gradle / Ivy

Go to download

The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts

There is a newer version: 4.1.1
Show newest version
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;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy