56
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
* Template iterator
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
package com.nokia.tracecompiler.engine.header;
|
|
20 |
|
|
21 |
/**
|
|
22 |
* Template iterator
|
|
23 |
*
|
|
24 |
*/
|
|
25 |
final class TemplateIterator {
|
|
26 |
|
|
27 |
/**
|
|
28 |
* Iterator class
|
|
29 |
*/
|
|
30 |
private Class<? extends TemplateIteratorEntry> iteratorClass;
|
|
31 |
|
|
32 |
/**
|
|
33 |
* Template to be run by the iterator
|
|
34 |
*/
|
|
35 |
private Object[] template;
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Constructor
|
|
39 |
*
|
|
40 |
* @param iteratorClass
|
|
41 |
* the iterator class
|
|
42 |
* @param template
|
|
43 |
* the template
|
|
44 |
*/
|
|
45 |
TemplateIterator(Class<? extends TemplateIteratorEntry> iteratorClass,
|
|
46 |
Object[] template) {
|
|
47 |
this.iteratorClass = iteratorClass;
|
|
48 |
this.template = template;
|
|
49 |
}
|
|
50 |
|
|
51 |
/**
|
|
52 |
* Gets the iterator class
|
|
53 |
*
|
|
54 |
* @return the class
|
|
55 |
*/
|
|
56 |
final Class<? extends TemplateIteratorEntry> getIteratorClass() {
|
|
57 |
return iteratorClass;
|
|
58 |
}
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Gets the template
|
|
62 |
*
|
|
63 |
* @return the template
|
|
64 |
*/
|
|
65 |
final Object[] getTemplate() {
|
|
66 |
return template;
|
|
67 |
}
|
|
68 |
|
|
69 |
}
|