Codota Logo
KernelTry
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

  • Running tasks concurrently on multiple threads
  • findViewById (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • orElseThrow (Optional)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now