Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 4d76ca8185f318a5e4b159f94a58e81342afa694 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*******************************************************************************
 * Copyright (c) 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.debug.ui.memory;

import java.math.BigInteger;

import org.eclipse.debug.core.model.MemoryByte;

/**
 * A memory rendering element represents a set of memory bytes being
 * rendered in a memory rendering. Instances of this class are passed
 * to a rendering's label provider, color provider, and font provider
 * to be rendered.
 * <p>
 * Clients may instantiate this class. Clients may subclass this class to add
 * other members / settings as required by a rendering.
 * </p>
 * @since 3.1
 */
public class MemoryRenderingElement {
	private IMemoryRendering fRendering;
	private BigInteger fAddress;
	private MemoryByte[] fBytes;

	/**
	 * Constructs a new memory rendering element for the given rendering
	 * and specified bytes.
	 *
	 * @param rendering the rendering containing the memory block being rendered
	 * @param address the address at which the rendering is taking place
	 * @param bytes the memory bytes being rendered
	 */
	public MemoryRenderingElement(IMemoryRendering rendering, BigInteger address, MemoryByte[] bytes)
	{
		fRendering = rendering;
		fAddress = address;
		fBytes = bytes;
	}

	/**
	 * Returns the memory rendering in which bytes are being rendered.
	 *
	 * @return the memory rendering in which bytes are being rendered
	 */
	public IMemoryRendering getRendering()
	{
		return fRendering;
	}

	/**
	 * Returns the address at which bytes are being rendered.
	 *
	 * @return the address at which bytes are being rendered
	 */
	public BigInteger getAddress() {
		return fAddress;
	}


	/**
	 * Returns the memory bytes being rendered.
	 *
	 * @return the memory bytes being rendered
	 */
	public MemoryByte[] getBytes() {
		return fBytes;
	}
}

Back to the top