ref_send API 2.17
defensive programming in Java

org.ref_send.log
Class CallSite

java.lang.Object
  extended by org.joe_e.Struct
      extended by org.ref_send.log.CallSite
All Implemented Interfaces:
java.io.Serializable, Immutable, Powerless, Selfless, Record

public class CallSite
extends Struct
implements Powerless, Record, java.io.Serializable

A source code location.

See Also:
Serialized Form

Field Summary
 java.lang.String name
          call site's human meaningful name within the source
 java.lang.String source
          path to the source code containing the call site
 PowerlessArray<IntArray> span
          call site's position within the source (optional)
 
Constructor Summary
CallSite(java.lang.String name, java.lang.String source, PowerlessArray<IntArray> span)
          Constructs an instance.
 
Method Summary
 
Methods inherited from class org.joe_e.Struct
equals, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.joe_e.Selfless
hashCode
 

Field Detail

name

public final java.lang.String name
call site's human meaningful name within the source


source

public final java.lang.String source
path to the source code containing the call site


span

public final PowerlessArray<IntArray> span
call site's position within the source (optional)

The expected structure of this table defines a span from the start of the relevant source code to the end. The first row in the table is the start of the span and the second row is the end of the span. Each row lists the line number followed by the column number. For example, a span of code starting on line 5, column 8 and ending on line 6, column 12 is encoded as:

[ [ 5, 8 ], [ 6, 12 ] ]

The delimited span is inclusive, meaning the character at line 6, column 12 is included in the span defined above.

If the end of the span is unknown, it may be omitted. If the column number is unknown, it may also be omitted. For example, in the case where only the starting line number is known:

[ [ 5 ] ]

If source span information is unknown, this member is null.

Both lines and columns are numbered starting from one, so the first character in a source file is at [ 1, 1 ]. A column is a UTF-16 code unit, the same unit represented by a Java char. Lines are separated by any character sequence considered a Unicode line terminator.

Constructor Detail

CallSite

public CallSite(java.lang.String name,
                java.lang.String source,
                PowerlessArray<IntArray> span)
Constructs an instance.

Parameters:
name - name
source - source
span - span

ref_send API 2.17
defensive programming in Java

Submit a bug or feature, or get help

Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.