1 package net.sf.saxon.instruct; 2 3 import net.sf.saxon.expr.ComputedExpression; 4 import net.sf.saxon.expr.Container; 5 import net.sf.saxon.expr.Expression; 6 import net.sf.saxon.expr.ExpressionTool; 7 import net.sf.saxon.event.LocationProvider; 8 9 import java.io.Serializable ; 10 11 21 22 public class Procedure implements Serializable , Container, LocationProvider { 23 24 private Expression body; 25 private Executable executable; 26 private String systemId; 27 private int lineNumber; 28 private SlotManager stackFrameMap; 29 30 public Procedure() {}; 31 32 public void setBody(Expression body) { 33 this.body = body; 34 ExpressionTool.makeParentReferences(body); 35 if (body instanceof ComputedExpression) { 36 ((ComputedExpression)body).setParentExpression(this); 37 } 38 } 39 40 public final Expression getBody() { 41 return body; 42 } 43 44 public void setStackFrameMap(SlotManager map) { 45 stackFrameMap = map; 46 } 47 48 public SlotManager getStackFrameMap() { 49 return stackFrameMap; 50 } 51 52 public final Executable getExecutable() { 53 return executable; 54 } 55 56 public void setExecutable(Executable executable) { 57 this.executable = executable; 58 } 59 60 63 64 public LocationProvider getLocationProvider() { 65 return this; 66 } 67 68 public void setLineNumber(int lineNumber) { 69 this.lineNumber = lineNumber; 70 } 71 72 public void setSystemId(String systemId) { 73 this.systemId = systemId; 74 } 75 76 public int getLineNumber() { 77 return lineNumber; 78 } 79 80 public String getSystemId() { 81 return systemId; 82 } 83 84 public int getColumnNumber() { 85 return -1; 86 } 87 88 public String getPublicId() { 89 return null; 90 } 91 92 public String getSystemId(int locationId) { 93 return systemId; 94 } 95 96 public int getLineNumber(int locationId) { 97 return lineNumber; 98 } 99 100 } 101 102 103 | Popular Tags |