Codota Logo
SootClass.getName
Code IndexAdd Codota 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)

  • Common ways to obtain SootClass
private void myMethod () {
SootClass s =
  • Codota IconString className;Scene.v().getSootClass(className)
  • Codota IconSootMethod sm;sm.getDeclaringClass()
  • Codota IconRefType refType;refType.getSootClass()
  • Smart code suggestions by Codota
}
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

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • putExtra (Intent)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JLabel (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now