Tabnine Logo
KernelTry
Code IndexAdd Tabnine to your IDE (free)

How to use
KernelTry
in
cn.wensiqun.asmsupport.core.block.control.exception

Best Java code snippets using cn.wensiqun.asmsupport.core.block.control.exception.KernelTry (Showing top 10 results out of 315)

origin: wensiqun/asmsupport

@Override
public void generate() {
  body();
}
origin: wensiqun/asmsupport

@Override
protected void doExecute(MethodExecuteContext context) {
  for (InstructionNode node : getChildren()) {
    node.execute(context);
  }
}
origin: wensiqun/asmsupport

@Override
public Label getSerialStart() {
  return tryBlock.getStart();
}
origin: wensiqun/asmsupport

      "Syntax error, insert \"Finally\" block or \"Catch\" block to complete Try Block.");
} else if (CollectionUtils.isNotEmpty(catches) && finallyBlock == null) {
  tryBlock.prepare();
  if (!tryBlock.isFinish()) {
    OperatorFactory.newOperator(GOTO.class, new Class[] { KernelProgramBlock.class, Label.class },
        tryBlock, getSerialEnd());
  addAnyExceptionCatchRange(tryBlock.getStart());
  tryBlock.prepare();
  if (!tryBlock.isFinish()) {
    OperatorFactory.newOperator(GOTO.class, new Class[] { KernelProgramBlock.class, Label.class },
        tryBlock, finallyBlock.getStart());
  addAnyExceptionCatchRange(tryBlock.getEnd());
  addAnyExceptionCatchRange(tryBlock.getStart());
  tryBlock.prepare();
  if (!tryBlock.isFinish()) {
    OperatorFactory.newOperator(GOTO.class, new Class[] { KernelProgramBlock.class, Label.class },
        tryBlock, finallyBlock.getStart());
origin: wensiqun/asmsupport

void appendEpisode(KernelCatch catchBlock) {
  initEpisode(catchBlock);
  if (catches == null) {
    catches = new ArrayList<>();
    getChildren().addAfter(tryBlock, catchBlock);
  } else {
    KernelCatch previous = catches.get(catches.size() - 1);
    IClass exceptionType = catchBlock.getExceptionType();
    if (exceptionType != null && exceptionType.isChildOrEqual(previous.getExceptionType())) {
      throw new ASMSupportException("Unreachable catch block for " + exceptionType
          + ". It is already handled by the catch block for " + exceptionType);
    }
    getChildren().addAfter(previous, catchBlock);
  }
  catches.add(catchBlock);
  // Add Exception Table:
  addTreCatchInfo(tryBlock.getStart(), tryBlock.getEnd(), catchBlock.getStart(), catchBlock.getExceptionType());
}
origin: wensiqun/asmsupport

@Override
public KernelFinally finally_(KernelFinally block) {
  ExceptionSerialBlock serial = getSerial();
  if (serial.getFinally() != null) {
    throw new ASMSupportException("Already exists finally block.");
  }
  getSerial().appendEpisode(block);
  return block;
}
origin: wensiqun/asmsupport

@Override
public Catch catch_(Catch catchBlock) {
  catchBlock.parent = parent;
  getDelegate().catch_(catchBlock.getDelegate());
  return catchBlock;
}
origin: wensiqun/asmsupport

@Override
public Finally finally_(Finally finallyClient) {
  finallyClient.parent = parent;
  getDelegate().finally_(finallyClient.getDelegate());
  return finallyClient;
}
origin: wensiqun/asmsupport

@Override
public void execute(MethodExecuteContext context) {
  tryBlock.execute(context);
  if (CollectionUtils.isNotEmpty(catches)) {
    for (KernelCatch c : catches) {
      c.execute(context);
    }
  }
  if (finallyBlock != null) {
    implicitCatch.execute(context);
    finallyBlock.execute(context);
  }
}
origin: wensiqun/asmsupport

@Override
public KernelCatch catch_(KernelCatch catchBlock) {
  ExceptionSerialBlock serial = getSerial();
  if (serial.getFinally() != null) {
    throw new ASMSupportException("Exists finally block. please create catch before finally block");
  }
  getSerial().appendEpisode(catchBlock);
  return catchBlock;
}
cn.wensiqun.asmsupport.core.block.control.exceptionKernelTry

Most used methods

  • body
  • catch_
  • execute
  • finally_
  • getChildren
  • getEnd
  • getSerial
  • getStart
  • isFinish
  • prepare

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now