|
|||||||||
| Home >> All >> ch >> epfl >> lamp >> [ smartanalysis overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
ch.epfl.lamp.smartanalysis
Class Reference

java.lang.Objectch.epfl.lamp.smartanalysis.Reference
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- DepClass, DepField, DepMethod, Reference.UnknownReference
- public abstract class Reference
- extends java.lang.Object
- implements java.io.Serializable
- extends java.lang.Object
Describes a Reference that a DepClass C uses. can be:
- a DepClass D , if the C reference D in its Constant Pool,
- a DepMethod D.m(), if C call D.m(),
- a DepField D.f, if C uses D.f.
- Version:
- 1.0
| Nested Class Summary | |
static class |
Reference.UnknownReference
represent a reference that we can't find the origin. |
| Field Summary | |
protected int |
accessRight
the access rigth of that reference. |
protected DepClass |
belongTo
the DepClass D in wich this references is defined |
private java.lang.String |
name
|
private java.util.Set |
users
|
| Constructor Summary | |
protected |
Reference(java.lang.String name,
DepClass owner,
int access)
Creates a new Reference instance. |
| Method Summary | |
protected void |
addUser(DepClass dep)
add an user to that reference |
protected void |
addUsers(DepClass[] dep)
|
void |
delete()
delete all the users if that reference. |
boolean |
equals(java.lang.Object o)
Determine whether this Object is semantically equal to another Object. |
int |
getAccess()
|
abstract java.lang.String |
getIdentifier()
get the identifier for that reference. |
java.lang.String |
getName()
get the name of this reference. |
DepClass |
getOwner()
get the owner of that reference |
DepClass[] |
getUsers()
Gets the users of that reference. |
boolean |
isAbstract()
|
boolean |
isDefault()
|
boolean |
isFinal()
|
boolean |
isInterface()
|
boolean |
isLessAccessible(int than)
|
static boolean |
isLessAccessible(int access,
int than)
|
boolean |
isMoreAccessible(int than)
|
static boolean |
isMoreAccessible(int access,
int than)
|
boolean |
isNative()
|
boolean |
isPrivate()
|
boolean |
isProtected()
|
boolean |
isPublic()
|
boolean |
isStatic()
|
boolean |
isSynchronized()
|
boolean |
isTransient()
|
boolean |
isVolatile()
|
void |
removeFinal()
|
void |
removeStatic()
|
protected boolean |
removeUser(DepClass dep)
remove an user from that class. |
void |
removeVolatile()
|
void |
setAbstract()
|
void |
setAccess(int acc)
set the access right for that reference. |
void |
setDefault()
|
void |
setFinal()
|
void |
setNative()
|
void |
setPrivate()
|
void |
setProtected()
|
void |
setPublic()
|
void |
setStatic()
|
void |
setSynchronized()
|
void |
setTransient()
|
void |
setVolatile()
|
java.lang.String |
toString()
return a String representation of that Reference. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
users
private java.util.Set users
name
private java.lang.String name
accessRight
protected int accessRight
- the access rigth of that reference.
belongTo
protected DepClass belongTo
- the DepClass D in wich this references is defined
| Constructor Detail |
Reference
protected Reference(java.lang.String name, DepClass owner, int access)
- Creates a new
Referenceinstance.
| Method Detail |
setAccess
public void setAccess(int acc)
- set the access right for that reference.
isLessAccessible
public boolean isLessAccessible(int than)
isMoreAccessible
public boolean isMoreAccessible(int than)
isLessAccessible
public static boolean isLessAccessible(int access,
int than)
isMoreAccessible
public static boolean isMoreAccessible(int access,
int than)
setDefault
public void setDefault()
setPublic
public void setPublic()
setPrivate
public void setPrivate()
setProtected
public void setProtected()
setStatic
public void setStatic()
removeStatic
public void removeStatic()
setFinal
public void setFinal()
removeFinal
public void removeFinal()
setVolatile
public void setVolatile()
removeVolatile
public void removeVolatile()
setTransient
public void setTransient()
setSynchronized
public void setSynchronized()
setNative
public void setNative()
setAbstract
public void setAbstract()
getAccess
public int getAccess()
isDefault
public boolean isDefault()
isPublic
public boolean isPublic()
isPrivate
public boolean isPrivate()
isProtected
public boolean isProtected()
isStatic
public boolean isStatic()
isFinal
public boolean isFinal()
isVolatile
public boolean isVolatile()
isTransient
public boolean isTransient()
isSynchronized
public boolean isSynchronized()
isNative
public boolean isNative()
isInterface
public boolean isInterface()
isAbstract
public boolean isAbstract()
getIdentifier
public abstract java.lang.String getIdentifier()
- get the identifier for that reference.
delete
public void delete()
- delete all the users if that reference.
getUsers
public DepClass[] getUsers()
- Gets the users of that reference.
toString
public java.lang.String toString()
- return a String representation of that Reference.
addUser
protected void addUser(DepClass dep)
- add an user to that reference
addUsers
protected void addUsers(DepClass[] dep)
removeUser
protected boolean removeUser(DepClass dep)
- remove an user from that class.
getName
public java.lang.String getName()
- get the name of this reference.
getOwner
public DepClass getOwner()
- get the owner of that reference
equals
public boolean equals(java.lang.Object o)
- Description copied from class:
java.lang.Object - Determine whether this Object is semantically equal
to another Object.
There are some fairly strict requirements on this method which subclasses must follow:
- It must be transitive. If
a.equals(b)andb.equals(c), thena.equals(c)must be true as well. - It must be symmetric.
a.equals(b)andb.equals(a)must have the same value. - It must be reflexive.
a.equals(a)must always be true. - It must be consistent. Whichever value a.equals(b) returns on the first invocation must be the value returned on all later invocations.
a.equals(null)must be false.- It must be consistent with hashCode(). That is,
a.equals(b)must implya.hashCode() == b.hashCode(). The reverse is not true; two objects that are not equal may have the same hashcode, but that has the potential to harm hashing performance.
This is typically overridden to throw a java.lang.ClassCastException if the argument is not comparable to the class performing the comparison, but that is not a requirement. It is legal for
a.equals(b)to be true even thougha.getClass() != b.getClass(). Also, it is typical to never cause a java.lang.NullPointerException.In general, the Collections API (
java.util) use theequalsmethod rather than the==operator to compare objects. However, java.util.IdentityHashMap is an exception to this rule, for its own good reasons.The default implementation returns
this == o. - It must be transitive. If
|
|||||||||
| Home >> All >> ch >> epfl >> lamp >> [ smartanalysis overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
ch.epfl.lamp.smartanalysis.Reference