add method IClass.isStatic()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2231 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
1682fbbf1b
commit
45bd43ebf8
|
@ -10,7 +10,6 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package com.ibm.wala.cast.loader;
|
package com.ibm.wala.cast.loader;
|
||||||
|
|
||||||
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -34,19 +33,19 @@ import com.ibm.wala.util.debug.Assertions;
|
||||||
|
|
||||||
abstract public class AstClass implements IClass, ClassConstants {
|
abstract public class AstClass implements IClass, ClassConstants {
|
||||||
private final CAstSourcePositionMap.Position sourcePosition;
|
private final CAstSourcePositionMap.Position sourcePosition;
|
||||||
|
|
||||||
private final TypeName typeName;
|
private final TypeName typeName;
|
||||||
|
|
||||||
private final IClassLoader loader;
|
private final IClassLoader loader;
|
||||||
|
|
||||||
private final short modifiers;
|
private final short modifiers;
|
||||||
|
|
||||||
protected final Map<Atom, IField> declaredFields;
|
protected final Map<Atom, IField> declaredFields;
|
||||||
|
|
||||||
protected final Map<Selector, IMethod> declaredMethods;
|
protected final Map<Selector, IMethod> declaredMethods;
|
||||||
|
|
||||||
protected AstClass(CAstSourcePositionMap.Position sourcePosition,
|
protected AstClass(CAstSourcePositionMap.Position sourcePosition, TypeName typeName, IClassLoader loader, short modifiers,
|
||||||
TypeName typeName,
|
Map<Atom, IField> declaredFields, Map<Selector, IMethod> declaredMethods) {
|
||||||
IClassLoader loader,
|
|
||||||
short modifiers,
|
|
||||||
Map<Atom, IField> declaredFields,
|
|
||||||
Map<Selector,IMethod> declaredMethods)
|
|
||||||
{
|
|
||||||
this.sourcePosition = sourcePosition;
|
this.sourcePosition = sourcePosition;
|
||||||
this.typeName = typeName;
|
this.typeName = typeName;
|
||||||
this.loader = loader;
|
this.loader = loader;
|
||||||
|
@ -67,6 +66,10 @@ abstract public class AstClass implements IClass, ClassConstants {
|
||||||
return (modifiers & ACC_PUBLIC) != 0;
|
return (modifiers & ACC_PUBLIC) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isStatic() {
|
||||||
|
return (modifiers & ACC_STATIC) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isReferenceType() {
|
public boolean isReferenceType() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +122,6 @@ abstract public class AstClass implements IClass, ClassConstants {
|
||||||
return gatherInterfaces();
|
return gatherInterfaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public IMethod getClassInitializer() {
|
public IMethod getClassInitializer() {
|
||||||
return getMethod(MethodReference.clinitSelector);
|
return getMethod(MethodReference.clinitSelector);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,10 @@ abstract public class AstFunctionClass implements IClass, ClassConstants {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isStatic() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public int getModifiers() {
|
public int getModifiers() {
|
||||||
return ACC_PUBLIC;
|
return ACC_PUBLIC;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue