-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMesherCallPointSegment.java
37 lines (33 loc) · 1.13 KB
/
MesherCallPointSegment.java
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
/**
* Copyright Basis International, Ltd.
* User: shaney
* Date: 5/21/12
* Time: 9:40 PM
*/
public class MesherCallPointSegment extends CallPointSegment {
protected CustomCallpointSubroutines customCallpointSubroutines;
protected MesherCallPointSegment(){}
public MesherCallPointSegment(String name, String codeBlock){
super(name,codeBlock);
if (name.contains("<CUSTOM")){
customCallpointSubroutines=new CustomCallpointSubroutines(codeBlock);
}
}
public String getCodeBlock(){
if (!isCustom()){
return super.getCodeBlock();
}
else {
// Construct the custom code block
String codeBlock="";
codeBlock=codeBlock.concat(customCallpointSubroutines.customCallpointHeader);
for (String subroutineName:customCallpointSubroutines.subroutineList) {
codeBlock=codeBlock.concat(customCallpointSubroutines.get(subroutineName));
}
return codeBlock;
}
}
public CustomCallpointSubroutines getCustomCallpointSubroutines() {
return customCallpointSubroutines;
}
}