diff --git a/com.ibm.wala.core/src/com/ibm/wala/classLoader/IMethod.java b/com.ibm.wala.core/src/com/ibm/wala/classLoader/IMethod.java index 0ab7a3fc1..879bef027 100644 --- a/com.ibm.wala.core/src/com/ibm/wala/classLoader/IMethod.java +++ b/com.ibm.wala.core/src/com/ibm/wala/classLoader/IMethod.java @@ -18,80 +18,57 @@ import com.ibm.wala.types.Selector; import com.ibm.wala.types.TypeReference; /** - * * Basic interface for an object that represents a single Java method for analysis purposes. - * - * @author sfink */ public interface IMethod extends IMember, ContextItem { /** * Is this method synchronized? - * - * @return boolean */ boolean isSynchronized(); /** * Is this method a class initializer? - * - * @return boolean */ boolean isClinit(); /** * Is this method an object initializer? - * - * @return boolean */ boolean isInit(); /** * Is this method native? - * - * @return boolean */ boolean isNative(); /** * Did someone synthesize this method? (As opposed to reading it from a class file) - * - * @return boolean */ boolean isSynthetic(); /** * Is this method abstract? - * - * @return boolean */ boolean isAbstract(); /** * Is this method private? - * - * @return boolean */ boolean isPrivate(); /** * Is this method protected? - * - * @return boolean */ boolean isProtected(); /** * Is this method public? - * - * @return boolean */ boolean isPublic(); /** * Is this method final? - * - * @return boolean */ boolean isFinal(); @@ -137,37 +114,30 @@ public interface IMethod extends IMember, ContextItem { TypeReference[] getDeclaredExceptions() throws InvalidClassFileException, UnsupportedOperationException; /** - * @return the source line number corresponding to a particular bytecode index, or -1 if the information is not - * available. + * @return the source line number corresponding to a particular bytecode index, or -1 if the information is not available. * @throws InvalidClassFileException */ int getLineNumber(int bcIndex) throws InvalidClassFileException; /** - * @return the (source code) name of the local variable of a given number at the specified program counter, or null if - * the information is not available. + * @return the (source code) name of the local variable of a given number at the specified program counter, or null if the + * information is not available. * @throws InvalidClassFileException */ String getLocalVariableName(int bcIndex, int localNumber) throws InvalidClassFileException; /** * something like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer; - * - * @return String */ public String getSignature(); /** * something like: foo(Ljava/langString;)Ljava/lang/Class; - * - * @return String */ public Selector getSelector(); /** - * Method getDescriptor. something like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer; - * - * @return Descriptor + * something like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer; */ Descriptor getDescriptor(); diff --git a/com.ibm.wala.core/src/com/ibm/wala/ipa/cha/IClassHierarchy.java b/com.ibm.wala.core/src/com/ibm/wala/ipa/cha/IClassHierarchy.java index f5257b02c..4a68ba2d4 100644 --- a/com.ibm.wala.core/src/com/ibm/wala/ipa/cha/IClassHierarchy.java +++ b/com.ibm.wala.core/src/com/ibm/wala/ipa/cha/IClassHierarchy.java @@ -17,7 +17,7 @@ import com.ibm.wala.types.TypeReference; /** * General interface for a type hierarchy - * + * */ public interface IClassHierarchy extends Iterable { @@ -31,8 +31,7 @@ public interface IClassHierarchy extends Iterable { /** * @return true if the add succeeded; false if it failed for some reason - * @throws IllegalArgumentException - * if klass is null + * @throws IllegalArgumentException if klass is null */ public boolean addClass(IClass klass); @@ -50,61 +49,49 @@ public interface IClassHierarchy extends Iterable { /** * Find the possible targets of a call to a method reference * - * @param ref - * method reference + * @param ref method reference * @return the set of IMethods that this call can resolve to. - * @throws IllegalArgumentException - * if ref is null + * @throws IllegalArgumentException if ref is null */ public Collection getPossibleTargets(MethodReference ref); - /** * Find the possible targets of a call to a method reference where the receiver is of a certain type + * * @param receiverClass the class of the receiver * @param ref method reference * @return the set of IMethods that this call can resolve to. */ public Set getPossibleTargets(IClass receiverClass, MethodReference ref); + /** - * Return the unique receiver of an invocation of method on an object of type - * m.getDeclaredClass + * Return the unique receiver of an invocation of method on an object of type m.getDeclaredClass * * @return IMethod, or null if no appropriate receiver is found. - * @throws IllegalArgumentException - * if m is null + * @throws IllegalArgumentException if m is null */ public IMethod resolveMethod(MethodReference m); /** - * @return the canonical IField that represents a given field , or - * null if none found - * @throws IllegalArgumentException - * if f is null + * @return the canonical IField that represents a given field , or null if none found + * @throws IllegalArgumentException if f is null */ public IField resolveField(FieldReference f); /** - * @return the canonical IField that represents a given field , or - * null if none found - * @throws IllegalArgumentException - * if f is null - * @throws IllegalArgumentException - * if klass is null + * @return the canonical IField that represents a given field , or null if none found + * @throws IllegalArgumentException if f is null + * @throws IllegalArgumentException if klass is null */ public IField resolveField(IClass klass, FieldReference f); /** - * Return the unique receiver of an invocation of method on an object of type - * declaringClass + * Return the unique receiver of an invocation of method on an object of type declaringClass * - * @param receiverClass - * type of receiver - * @param selector - * method signature + * @param receiverClass type of receiver + * @param selector method signature * @return Method resolved method abstraction - * @throws IllegalArgumentException - * if receiverClass is null + * @throws IllegalArgumentException if receiverClass is null */ public IMethod resolveMethod(IClass receiverClass, Selector selector); @@ -112,12 +99,11 @@ public interface IClassHierarchy extends Iterable { * Load a class using one of the loaders specified for this class hierarchy * * @return null if can't find the class. - * @throws IllegalArgumentException - * if A is null + * @throws IllegalArgumentException if A is null */ public IClass lookupClass(TypeReference A); -// public boolean isSyntheticClass(IClass c); + // public boolean isSyntheticClass(IClass c); public boolean isInterface(TypeReference type); @@ -128,14 +114,13 @@ public interface IClassHierarchy extends Iterable { /** * Is c a subclass of T? * - * @throws IllegalArgumentException - * if c is null + * @throws IllegalArgumentException if c is null */ public boolean isSubclassOf(IClass c, IClass T); /** * Does c implement i? - * + * * @return true iff i is an interface and c is a class that implements i, */ public boolean implementsInterface(IClass c, IClass i); @@ -146,24 +131,21 @@ public interface IClassHierarchy extends Iterable { public Collection computeSubClasses(TypeReference type); /** - * Solely for optimization; return a Collection representing - * the subclasses of Error + * Solely for optimization; return a Collection representing the subclasses of Error * * kind of ugly. a better scheme? */ public Collection getJavaLangErrorTypes(); - + /** - * Solely for optimization; return a Collection representing - * the subclasses of {@link RuntimeException} + * Solely for optimization; return a Collection representing the subclasses of {@link RuntimeException} * * kind of ugly. a better scheme? */ public Collection getJavaLangRuntimeExceptionTypes(); /** - * @param type - * an interface + * @param type an interface * @return Set of IClass that represent implementors of the interface */ public Set getImplementors(TypeReference type); @@ -178,16 +160,13 @@ public interface IClassHierarchy extends Iterable { */ public Collection getImmediateSubclasses(IClass klass); - /** * Does an expression c1 x := c2 y typecheck? * * i.e. is c2 a subtype of c1? * - * @throws IllegalArgumentException - * if c1 is null - * @throws IllegalArgumentException - * if c2 is null + * @throws IllegalArgumentException if c1 is null + * @throws IllegalArgumentException if c2 is null */ public boolean isAssignableFrom(IClass c1, IClass c2);