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

com.dragome.compiler.ast.ExceptionHandlers Maven / Gradle / Ivy

There is a newer version: 0.96-beta4
Show newest version
package com.dragome.compiler.ast;

import java.util.ArrayList;

import org.apache.bcel.classfile.Code;
import org.apache.bcel.classfile.CodeException;

public class ExceptionHandlers extends ArrayList
{

	public ExceptionHandlers(Code code)
	{

		CodeException previousCodeException= null;
		for (CodeException codeException : code.getExceptionTable())
		{
			if (previousCodeException != null && previousCodeException.getHandlerPC() == codeException.getHandlerPC())
			{
				previousCodeException.setEndPC(codeException.getEndPC());
			}
			else
			{
				add(new ExceptionHandler(codeException));
			}
			previousCodeException= codeException;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy