jml2b.structure.java
Class Identifier

java.lang.Object
  extended byjml2b.util.Profiler
      extended byjml2b.structure.java.Identifier
All Implemented Interfaces:
java.io.Serializable

public class Identifier
extends Profiler
implements java.io.Serializable

class representing Java/Jml identifiers.

Author:
A. Requet
See Also:
Serialized Form

Field Summary
 AClass cl
           
 AField field
           
static int ID_CLASS
          Identifiers representing a class
static int ID_FIELD
          Identifiers corresponding to fields.
static int ID_METHOD
          Identifiers corresponding to methods
static int ID_PACKAGE
          Identifiers representing a package:
static int ID_UNKNOWN
          Identifiers whose type is not known yet.
 int idType
           
 AMethod mth
           
 Package pkg
           
 
Constructor Summary
Identifier(AClass c)
          Creates a class identifier for the given class.
Identifier(AField f)
          Creates a field identifier.
Identifier(AMethod m)
          Creates an identifier for the given method.
Identifier(java.lang.String id)
          Creates an identifier from unknown type with the given string.
 
Method Summary
 boolean equals(Identifier i)
          Indicate wether this identifier is equal to the given one.
 java.lang.String getName()
           
 LinkInfo linkFieldIdent(IJml2bConfiguration config, LinkContext ctx, ParsedItem ident_box)
           
 java.lang.String toString()
           
 
Methods inherited from class jml2b.util.Profiler
runGC
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

idType

public int idType

cl

public AClass cl

mth

public AMethod mth

pkg

public Package pkg

field

public AField field

ID_UNKNOWN

public static final int ID_UNKNOWN
Identifiers whose type is not known yet.

See Also:
Constant Field Values

ID_CLASS

public static final int ID_CLASS
Identifiers representing a class

See Also:
Constant Field Values

ID_PACKAGE

public static final int ID_PACKAGE
Identifiers representing a package:

See Also:
Constant Field Values

ID_METHOD

public static final int ID_METHOD
Identifiers corresponding to methods

See Also:
Constant Field Values

ID_FIELD

public static final int ID_FIELD
Identifiers corresponding to fields.

See Also:
Constant Field Values
Constructor Detail

Identifier

public Identifier(AField f)
Creates a field identifier.

Parameters:
f - the field this identifier will refer to.

Identifier

public Identifier(AClass c)
Creates a class identifier for the given class.

Parameters:
c - the class this identifier will refer to.

Identifier

public Identifier(AMethod m)
Creates an identifier for the given method.

Parameters:
m - the method this identifier refers to.

Identifier

public Identifier(java.lang.String id)
Creates an identifier from unknown type with the given string.

Parameters:
id - the content of the identifier.
Method Detail

getName

public java.lang.String getName()

toString

public java.lang.String toString()

equals

public boolean equals(Identifier i)
Indicate wether this identifier is equal to the given one.

Parameters:
i - the identifier to compare.
Returns:
boolean true if and only if this identifier is equal to i.

linkFieldIdent

public LinkInfo linkFieldIdent(IJml2bConfiguration config,
                               LinkContext ctx,
                               ParsedItem ident_box)
                        throws Jml2bException
Parameters:
ident_box - the box that is used for reporting link errors.
Throws:
Jml2bException