Entry points for projects with Java nature
SAFE provides four options to specify entrypoints for typestate analysis of a Java project (including a Plug-In project).
In more details,
All main classes as entry points
All main classes specifies that all main() methods should be automatically detected and used as entry points for the analysis.
Some main classes as entry points
Some main classes item allows you to collect automatically all main methods present in projects selected (via Detect button). Then, you can select subset via the menu item.
Some methods as entry points
Some methods allows you to identify specific methods of some classes of your choice as entry points. They need not be static.
To do so, click the Add button and select one or few classes which you would like to consider for entry points.
Then you can select the methods you would like as entry points.
XML file to give entry points
XML file item allows you to specify an XML file that contains a list of entry points. This XML file must obey the following Schema:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="parameters-type">
    <xs:complexType>
        <xs:sequence>
        <xs:element name="parameter-type" type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="entry-point">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="class-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
        <xs:element name="method-name" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element ref="parameters-type" minOccurs="0" maxOccurs="1"/>
        <xs:element name="return-type" type="xs:string" minOccurs="0" maxOccurs="1"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="entry-points">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="entry-point"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
For example:
<?xml version="1.0" encoding="utf-8"?>
<entry-points>

  <entry-point>
    <class-name>my.package.MyClass</class-name>
    <method-name>dummy</method-name>

    <parameters-type>
      <parameter-type>int []</parameter-type>
    </parameters-type>

    <return-type>void</return-type>
  </entry-point>

</entry-points>
Privacy |  Legal |  Feedback |  IBM Home |  Research Home |  Project List |  Research Sites |  Contact Us