2
|
1 |
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
|
2 |
// Use of this source code is governed by a BSD-style license that can be
|
|
3 |
// found in the LICENSE file.
|
|
4 |
|
|
5 |
package org.chromium.sdk.internal;
|
|
6 |
|
|
7 |
/**
|
|
8 |
* A holder for the function-specific properties.
|
|
9 |
*/
|
|
10 |
public class FunctionAdditionalProperties {
|
|
11 |
private final int sourcePosition;
|
|
12 |
private final int scriptId;
|
|
13 |
|
|
14 |
public FunctionAdditionalProperties(int sourcePosition, int scriptId) {
|
|
15 |
this.sourcePosition = sourcePosition;
|
|
16 |
this.scriptId = scriptId;
|
|
17 |
}
|
|
18 |
|
|
19 |
/**
|
|
20 |
* @return source position or {@link #NO_POSITION} if position is not available
|
|
21 |
*/
|
|
22 |
public int getSourcePosition() {
|
|
23 |
return sourcePosition;
|
|
24 |
}
|
|
25 |
|
|
26 |
public static final int NO_POSITION = -1;
|
|
27 |
|
|
28 |
/**
|
|
29 |
* @return script id or {@link #NO_SCRIPT_ID} if script is not available
|
|
30 |
*/
|
|
31 |
public int getScriptId() {
|
|
32 |
return scriptId;
|
|
33 |
}
|
|
34 |
|
|
35 |
public static final int NO_SCRIPT_ID = -1;
|
|
36 |
}
|