Tabnine Logo
SootClass.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
soot.SootClass

Best Java code snippets using soot.SootClass.getName (Showing top 20 results out of 315)

origin: Sable/soot

/**
 * Adds the given exception to the list of exceptions thrown by this method.
 */
public void addException(SootClass e) {
 logger.trace("Adding exception {}", e);
 if (exceptions == null) {
  exceptions = new ArrayList<SootClass>();
 } else if (exceptions.contains(e)) {
  throw new RuntimeException("already throws exception " + e.getName());
 }
 exceptions.add(e);
}
origin: Sable/soot

/**
 * Determines and returns the internal name of a class.
 * 
 * @param cls
 *          the class.
 * @return corresponding internal name.
 */
public static String toInternalName(SootClass cls) {
 return toInternalName(cls.getName());
}
origin: Sable/soot

/**
 * Attempts to retrieve the method with the given name, parameters and return type. If no matching method can be found, an
 * exception is thrown.
 */
public SootMethod getMethod(String name, List<Type> parameterTypes, Type returnType) {
 SootMethod sm = getMethodUnsafe(name, parameterTypes, returnType);
 if (sm != null) {
  return sm;
 }
 throw new RuntimeException(
   "Class " + getName() + " doesn't have method " + name + "(" + parameterTypes + ")" + " : " + returnType);
}
origin: Sable/soot

public boolean isIncluded(SootClass sc) {
 String name = sc.getName();
 for (String inc : Options.v().include()) {
  if (name.equals(inc)
    || ((inc.endsWith(".*") || inc.endsWith("$*")) && name.startsWith(inc.substring(0, inc.length() - 1)))) {
   return true;
  }
 }
 return false;
}
origin: Sable/soot

/**
 * Removes the given class from the list of interfaces which are directly implemented by this class.
 */
public void removeInterface(SootClass interfaceClass) {
 checkLevel(HIERARCHY);
 if (!implementsInterface(interfaceClass.getName())) {
  throw new RuntimeException("no such interface: " + interfaceClass.getName());
 }
 interfaces.remove(interfaceClass);
}
origin: Sable/soot

/**
 * WARNING: interfaces are subclasses of the java.lang.Object class! Returns the superclass of this class. (see
 * hasSuperclass())
 */
public SootClass getSuperclass() {
 checkLevel(HIERARCHY);
 if (superClass == null && !isPhantom()) {
  throw new RuntimeException("no superclass for " + getName());
 } else {
  return superClass;
 }
}
origin: Sable/soot

/**
 * @param lvNode
 * @param cName
 * @param mName
 * @return
 */
private boolean isDefinedIn(LocalVarNode lvNode, String cName, String mName) {
 return lvNode.getMethod() != null && lvNode.getMethod().getDeclaringClass().getName().equals(cName)
   && lvNode.getMethod().getName().equals(mName);
}
origin: Sable/soot

public void methodRef(SootMethodRef m) {
 handleIndent();
 if (!baf && m.resolve().isStatic()) {
  output.append(m.declaringClass().getName());
  literal(".");
 }
 output.append(m.name());
}
origin: Sable/soot

public SootMethod getMethod(String subsignature) {
 checkLevel(SIGNATURES);
 NumberedString numberedString = Scene.v().getSubSigNumberer().find(subsignature);
 if (numberedString == null) {
  throw new RuntimeException("No method " + subsignature + " in class " + getName());
 }
 return getMethod(numberedString);
}
origin: Sable/soot

public CPApplication(ASTMethodNode AST, HashMap<String, Object> constantValueFields,
  HashMap<String, SootField> classNameFieldNameToSootFieldMapping) {
 className = AST.getDavaBody().getMethod().getDeclaringClass().getName();
 cp = new CP(AST, constantValueFields, classNameFieldNameToSootFieldMapping);
}
origin: Sable/soot

@Override
public void caseStaticGetInst(StaticGetInst i) {
 SootFieldRef field = i.getFieldRef();
 mv.visitFieldInsn(Opcodes.GETSTATIC, slashify(field.declaringClass().getName()), field.name(),
   toTypeDesc(field.type()));
}
origin: Sable/soot

@Override
public void caseFieldGetInst(FieldGetInst i) {
 SootFieldRef field = i.getFieldRef();
 mv.visitFieldInsn(Opcodes.GETFIELD, slashify(field.declaringClass().getName()), field.name(),
   toTypeDesc(field.type()));
}
origin: Sable/soot

protected static MethodReference toMethodReference(SootMethodRef m) {
 List<String> parameters = new ArrayList<String>();
 for (Type t : m.parameterTypes()) {
  parameters.add(SootToDexUtils.getDexTypeDescriptor(t));
 }
 MethodReference methodRef = new ImmutableMethodReference(SootToDexUtils.getDexClassName(m.declaringClass().getName()),
   m.name(), parameters, SootToDexUtils.getDexTypeDescriptor(m.returnType()));
 return methodRef;
}
origin: Sable/soot

@Override
public void caseStaticInvokeInst(StaticInvokeInst i) {
 SootMethodRef m = i.getMethodRef();
 mv.visitMethodInsn(Opcodes.INVOKESTATIC, slashify(m.declaringClass().getName()), m.name(), toTypeDesc(m),
   m.declaringClass().isInterface() && !m.isStatic());
}
origin: Sable/soot

@Override
public void caseStaticPutInst(StaticPutInst i) {
 emit("putstatic " + slashify(i.getFieldRef().declaringClass().getName()) + "/" + i.getFieldRef().name() + " "
   + jasminDescriptorOf(i.getFieldRef().type()));
}
origin: Sable/soot

@Override
public void caseFieldGetInst(FieldGetInst i) {
 emit("getfield " + slashify(i.getFieldRef().declaringClass().getName()) + "/" + i.getFieldRef().name() + " "
   + jasminDescriptorOf(i.getFieldRef().type()));
}
origin: Sable/soot

private synchronized void ensureClassHasBodies(SootClass cl) {
 assert Scene.v().hasFastHierarchy();
 if (cl.resolvingLevel() < SootClass.BODIES) {
  Scene.v().forceResolve(cl.getName(), SootClass.BODIES);
  Scene.v().getOrMakeFastHierarchy();
 }
 assert Scene.v().hasFastHierarchy();
}
origin: Sable/soot

public void caseSpecialInvokeExpr(SpecialInvokeExpr v) {
 SootMethodRef m = v.getMethodRef();
 emitValue(v.getBase());
 for (int i = 0; i < m.parameterTypes().size(); i++) {
  emitValue(v.getArg(i));
 }
 emit("invokespecial " + slashify(m.declaringClass().getName()) + "/" + m.name() + jasminDescriptorOf(m),
   -(argCountOf(m) + 1) + sizeOfType(m.returnType()));
}
origin: Sable/soot

public void caseVirtualInvokeExpr(VirtualInvokeExpr v) {
 SootMethodRef m = v.getMethodRef();
 emitValue(v.getBase());
 for (int i = 0; i < m.parameterTypes().size(); i++) {
  emitValue(v.getArg(i));
 }
 emit("invokevirtual " + slashify(m.declaringClass().getName()) + "/" + m.name() + jasminDescriptorOf(m),
   -(argCountOf(m) + 1) + sizeOfType(m.returnType()));
}
origin: Sable/soot

 public void caseStaticFieldRef(StaticFieldRef v) {
  SootFieldRef field = v.getFieldRef();
  emitValue(rvalue);
  emit("putstatic " + slashify(field.declaringClass().getName()) + "/" + field.name() + " "
    + jasminDescriptorOf(field.type()), -sizeOfType(v.getFieldRef().type()));
 }
});
sootSootClassgetName

Javadoc

Returns the name of this class.

Popular methods of SootClass

  • isInterface
    Convenience method; returns true if this class is an interface.
  • getMethods
  • setApplicationClass
    Makes this class an application class.
  • getFields
    Returns a backed Chain of fields.
  • getInterfaces
    Returns a backed Chain of the interfaces that are directly implemented by this class. (see getInterf
  • getSuperclass
    WARNING: interfaces are subclasses of the java.lang.Object class! Returns the superclass of this cla
  • hasSuperclass
    WARNING: interfaces are subclasses of the java.lang.Object class! Does this class have a superclass?
  • resolvingLevel
  • addMethod
    Adds the given method to this class.
  • declaresMethod
    Does this class declare a method with the given subsignature?
  • getMethod
  • getType
    Returns the RefType corresponding to this class.
  • getMethod,
  • getType,
  • isApplicationClass,
  • isLibraryClass,
  • addField,
  • isAbstract,
  • isPhantom,
  • <init>,
  • declaresField

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSupportFragmentManager (FragmentActivity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JComboBox (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now