blob: 6d38976ce225b6f4dc522a02ff58dda1b7256e97 [file] [log] [blame]
/**********************************************************************
* This file is part of "Object Teams Dynamic Runtime Environment"
*
* Copyright 2009, 2012 Oliver Frank and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0 *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
*
* Contributors:
* Oliver Frank - Initial API and implementation
* Stephan Herrmann - Initial API and implementation
**********************************************************************/
package org.eclipse.objectteams.otredyn.bytecode;
/**
* Interface for classes, that provide bytecode for other classes
* @author Oliver Frank
*/
public interface IBytecodeProvider {
/**
* Returns the bytecode of the class with the given id.
* Attention: This may be an expensive operation
* (e.g. if the bytecode must be read from the hard disk).
* @param classId
* @return the bytecode of the class or null, if the class
* was not loaded yet.
*/
public byte[] getBytecode(String classId);
/**
* Sets the bytecode of the class with the given id
* in the BytecodeProvider
* Attention: This may be an expensive operation
* (e.g. if the bytecode is written to the hard disk).
* @param classId
* @param bytecode
*/
public void setBytecode(String classId, byte[] bytecode);
}