All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.wala.classLoader.PhantomClass Maven / Gradle / Ivy

package com.ibm.wala.classLoader;

import com.ibm.wala.core.util.strings.Atom;
import com.ibm.wala.ipa.cha.IClassHierarchy;
import com.ibm.wala.types.Selector;
import com.ibm.wala.types.TypeReference;
import java.util.Collection;
import java.util.Collections;

/** dummy class representing a missing superclass */
public class PhantomClass extends SyntheticClass {

  /**
   * @param T type reference describing this class
   */
  public PhantomClass(TypeReference T, IClassHierarchy cha) {
    super(T, cha);
  }

  @Override
  public boolean isPublic() {
    return false;
  }

  @Override
  public boolean isPrivate() {
    return false;
  }

  @Override
  public int getModifiers() throws UnsupportedOperationException {
    throw new UnsupportedOperationException();
  }

  @Override
  public IClass getSuperclass() {
    return getClassHierarchy().getRootClass();
  }

  @Override
  public Collection getDirectInterfaces() {
    return Collections.emptySet();
  }

  @Override
  public Collection getAllImplementedInterfaces() {
    return Collections.emptySet();
  }

  @Override
  public IMethod getMethod(Selector selector) {
    throw new UnsupportedOperationException();
  }

  @Override
  public IField getField(Atom name) {
    throw new UnsupportedOperationException();
  }

  @Override
  public IMethod getClassInitializer() {
    throw new UnsupportedOperationException();
  }

  @Override
  public Collection getDeclaredMethods() {
    throw new UnsupportedOperationException();
  }

  @Override
  public Collection getAllInstanceFields() {
    throw new UnsupportedOperationException();
  }

  @Override
  public Collection getAllStaticFields() {
    throw new UnsupportedOperationException();
  }

  @Override
  public Collection getAllFields() {
    throw new UnsupportedOperationException();
  }

  @Override
  public Collection getAllMethods() {
    throw new UnsupportedOperationException();
  }

  @Override
  public Collection getDeclaredInstanceFields() {
    throw new UnsupportedOperationException();
  }

  @Override
  public Collection getDeclaredStaticFields() {
    throw new UnsupportedOperationException();
  }

  @Override
  public boolean isReferenceType() {
    return true;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy