org.owasp.orizon
Class O

java.lang.Object
  extended by org.owasp.orizon.O
Direct Known Subclasses:
AbstractCore, AbstractCore, Check, Class, DesignInfo, Folder, Jericho, Keywords, Loader, MethodParam, Reader, Report, Session, SkyLine, Stats, Translator

public abstract class O
extends java.lang.Object

This is the main ancestor of all Orizon classes... a sort of Object class...

Author:
sp0nge

Field Summary
protected  java.lang.String base64
           
protected  boolean hasName
           
protected  boolean initialized
           
protected  int line_start
           
protected  int line_stop
           
protected  OrizonLog log
           
protected  java.lang.String reduced
           
protected  java.lang.Class what
           
 
Constructor Summary
O(java.lang.Class what)
           
O(java.lang.Class what, org.w3c.dom.Node n)
           
 
Method Summary
 java.lang.Object clone()
          Orizon objects cannot being cloned, so clone() method must be overridden.
 int getStartLine()
          Returns the referring object starting line inside the source code being reviewed
 int getStopLine()
          Returns the referring object ending line inside the source code being reviewed
static boolean isCompatible(int major, int minor)
           
 boolean isInitialized()
          Check if the object has been correctly instantiated with its constructor.
abstract  boolean readXmlNode(org.w3c.dom.Node n)
          As far from version 0.62 all items must be responsible for XML Node reading routine.
 void setStartLine(int line)
          Sets the referring object starting line inside the source code being reviewed
 void setStopLine(int line)
          Sets the referring object ending line inside the source code being reviewed
protected  boolean trackThis(org.w3c.dom.Node n)
          Given an XML node, Orizon objects need to know both starting than ending line in the source code.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hasName

protected boolean hasName

log

protected OrizonLog log

what

protected java.lang.Class what

base64

protected java.lang.String base64

reduced

protected java.lang.String reduced

initialized

protected boolean initialized

line_start

protected int line_start

line_stop

protected int line_stop
Constructor Detail

O

public O(java.lang.Class what)

O

public O(java.lang.Class what,
         org.w3c.dom.Node n)
Method Detail

readXmlNode

public abstract boolean readXmlNode(org.w3c.dom.Node n)
As far from version 0.62 all items must be responsible for XML Node reading routine. Source class must be able to instantiate an object passing XML Node as parameter and having that code read

Parameters:
n - the node being read
Returns:
true if xml node is well formed and correctly read, or false otherwise.

isInitialized

public boolean isInitialized()
Check if the object has been correctly instantiated with its constructor. It is possible to instantiate an object with serialization, bypassing all initialization you can put in the constructor method.

Returns:
true if object is initialized, false otherwise.

clone

public java.lang.Object clone()
Orizon objects cannot being cloned, so clone() method must be overridden.

Overrides:
clone in class java.lang.Object

trackThis

protected boolean trackThis(org.w3c.dom.Node n)
Given an XML node, Orizon objects need to know both starting than ending line in the source code.

Parameters:
n - the node being read
Returns:
true if position informations can be guessed from XML piece of code, or false otherwise.

getStartLine

public int getStartLine()
Returns the referring object starting line inside the source code being reviewed

Returns:
the starting line in the code

getStopLine

public int getStopLine()
Returns the referring object ending line inside the source code being reviewed

Returns:
the ending line in the code

setStartLine

public void setStartLine(int line)
Sets the referring object starting line inside the source code being reviewed

Parameters:
line - the line number to set

setStopLine

public void setStopLine(int line)
Sets the referring object ending line inside the source code being reviewed

Parameters:
line - the line number to set

isCompatible

public static final boolean isCompatible(int major,
                                         int minor)