Files
jpexs-decompiler/trunk/src/com/jpexs/asdec/action/treemodel/GetMemberTreeItem.java
2010-09-06 15:32:07 +02:00

24 lines
875 B
Java

package com.jpexs.asdec.action.treemodel;
import com.jpexs.asdec.action.Action;
public class GetMemberTreeItem extends TreeItem {
public TreeItem object;
public TreeItem functionName;
public GetMemberTreeItem(Action instruction, TreeItem object, TreeItem functionName) {
super(instruction, PRECEDENCE_PRIMARY);
this.object = object;
this.functionName = functionName;
}
@Override
public String toString(ConstantPool constants) {
if(!((functionName instanceof DirectValueTreeItem)&&(((DirectValueTreeItem)functionName).value instanceof String))){
//if(!(functionName instanceof GetVariableTreeItem))
return object.toString(constants) + "[" + stripQuotes(functionName)+"]";
}
return object.toString(constants) + "." + stripQuotes(functionName);
}
}