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

com.zving.framework.thirdparty.asm.tree.LabelNode Maven / Gradle / Ivy

There is a newer version: 0.3.0
Show newest version
package com.zving.framework.thirdparty.asm.tree;

import com.zving.framework.thirdparty.asm.Label;
import com.zving.framework.thirdparty.asm.MethodVisitor;
import java.util.Map;

public class LabelNode
  extends AbstractInsnNode
{
  private Label label;
  
  public LabelNode()
  {
    super(-1);
  }
  
  public LabelNode(Label label)
  {
    super(-1);
    this.label = label;
  }
  
  public int getType()
  {
    return 8;
  }
  
  public Label getLabel()
  {
    if (this.label == null) {
      this.label = new Label();
    }
    return this.label;
  }
  
  public void accept(MethodVisitor cv)
  {
    cv.visitLabel(getLabel());
  }
  
  public AbstractInsnNode clone(Map labels)
  {
    return (AbstractInsnNode)labels.get(this);
  }
  
  public void resetLabel()
  {
    this.label = null;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy