@Override public void caseStaticGetInst(StaticGetInst i) { SootFieldRef field = i.getFieldRef(); mv.visitFieldInsn(Opcodes.GETSTATIC, slashify(field.declaringClass().getName()), field.name(), toTypeDesc(field.type())); }
public SootField getField() { return fieldRef.resolve(); }
final String getParameters() { return " " + fieldRef.getSignature(); }
public void fieldRef(SootFieldRef f) { handleIndent(); if (baf || f.resolve().isStatic()) { output.append(f.declaringClass().getName()); literal("."); } output.append(f.name()); }
final FieldRef fieldRef = (FieldRef) value; SootFieldRef sootFieldRef = fieldRef.getFieldRef(); if (sootFieldRef.declaringClass().isLibraryClass()) { continue; final String oldName = sootFieldRef.name(); final String fullyQualifiedName = sootFieldRef.declaringClass().getName() + '.' + oldName; if (skipFields.contains(fullyQualifiedName)) { continue; sootFieldRef = Scene.v().makeFieldRef(sootFieldRef.declaringClass(), newName, sootFieldRef.type(), sootFieldRef.isStatic()); fieldRef.setFieldRef(sootFieldRef); try { sootFieldRef.resolve(); } catch (Exception exception) { logger.error("Cannot rename field \"" + oldName + "\" to \"" + newName + "\" due to error.", exception); logger.info("Fields of {}: {}", sootFieldRef.declaringClass().getName(), sootFieldRef.declaringClass().getFields()); throw new RuntimeException(exception);
public Type getType() { return fieldRef.type(); }
public DStaticFieldRef(SootFieldRef fieldRef, String myClassName) { super(fieldRef); supressDeclaringClass = myClassName.equals(fieldRef.declaringClass().getName()); }
SootFieldRef s = sfr.getFieldRef(); if (pag.getOpts().empties_as_allocs()) { if (s.declaringClass().getName().equals("java.util.Collections")) { if (s.name().equals("EMPTY_SET")) { src = pag.makeAllocNode(rtHashSet, rtHashSet, method); } else if (s.name().equals("EMPTY_MAP")) { src = pag.makeAllocNode(rtHashMap, rtHashMap, method); } else if (s.name().equals("EMPTY_LIST")) { src = pag.makeAllocNode(rtLinkedList, rtLinkedList, method); } else if (s.declaringClass().getName().equals("java.util.Hashtable")) { if (s.name().equals("emptyIterator")) { src = pag.makeAllocNode(rtHashtableEmptyIterator, rtHashtableEmptyIterator, method); } else if (s.name().equals("emptyEnumerator")) { src = pag.makeAllocNode(rtHashtableEmptyEnumerator, rtHashtableEmptyEnumerator, method);
public BFieldGetInst(SootFieldRef fieldRef) { if (fieldRef.isStatic()) { throw new RuntimeException("wrong static-ness"); } this.fieldRef = fieldRef; }
public void fieldRef(SootFieldRef f) { handleIndent(); output.append(f.name()); }
public void fieldRef( SootFieldRef f ) { handleIndent(); if( baf || f.resolve().isStatic() ){ output.append( f.declaringClass().getName() ); literal("."); } output.append(f.name()); } public void identityRef( IdentityRef r ) {
public Type getType() { return fieldRef.type(); }
public void toString(UnitPrinter up) { if (!supressDeclaringClass) { up.type(fieldRef.declaringClass().getType()); up.literal("."); } up.fieldRef(fieldRef); }
public BStaticPutInst(SootFieldRef fieldRef) { if (!fieldRef.isStatic()) { throw new RuntimeException("wrong static-ness"); } this.fieldRef = fieldRef; }
public String toString() { if (thisLocals.contains(getBase())) { return fieldRef.name(); } return super.toString(); }
public void outASigFieldRef(ASigFieldRef node) { SootFieldRef field = (SootFieldRef) mProductions.removeLast(); field = Scene.v().makeFieldRef(field.declaringClass(), field.name(), field.type(), true); mProductions.addLast(Jimple.v().newStaticFieldRef(field)); }
public SootField getField() { return fieldRef.resolve(); }
public void fieldRef( SootFieldRef f ) { handleIndent(); if( baf || f.resolve().isStatic() ){ output.append( f.declaringClass().getName() ); literal("."); } output.append(f.name()); } public void identityRef( IdentityRef r ) {
public int getInMachineCount() { return AbstractJasminClass.sizeOfType(fieldRef.type()); }
private void handleInstanceFieldRef(InstanceFieldRef ifr, Stmt stmt) { ifr.setBase(this.uv.visit(ifr.getBase(), ifr.getFieldRef().declaringClass().getType(), stmt)); }