mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 16:10:46 +00:00
More documentation.
This commit is contained in:
@@ -18,26 +18,46 @@ package com.jpexs.decompiler.graph;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
* An item that cannot be statically computed.
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class NotCompileTimeItem extends GraphTargetItem {
|
||||
|
||||
/**
|
||||
* Object that cannot be statically computed.
|
||||
*/
|
||||
public GraphTargetItem object;
|
||||
|
||||
/**
|
||||
* Constructs a new NotCompileTimeItem.
|
||||
* @param instruction Instruction
|
||||
* @param lineStartIns Line start instruction
|
||||
* @param object Object that cannot be statically computed
|
||||
*/
|
||||
public NotCompileTimeItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
|
||||
super(instruction, lineStartIns, NOPRECEDENCE);
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this item can be computed statically.
|
||||
* @param dependencies Dependencies
|
||||
* @return Whether this item can be computed statically
|
||||
*/
|
||||
@Override
|
||||
public boolean isCompileTime(Set<GraphTargetItem> dependencies) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets through the object that cannot be statically computed.
|
||||
* @return Through the object that cannot be statically computed
|
||||
*/
|
||||
@Override
|
||||
public GraphTargetItem getThroughNotCompilable() {
|
||||
if (object == null) {
|
||||
@@ -46,16 +66,31 @@ public class NotCompileTimeItem extends GraphTargetItem {
|
||||
return object.getThroughNotCompilable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends this item to the writer.
|
||||
* @param writer Writer
|
||||
* @param localData Local data
|
||||
* @return Writer
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
return object.toString(writer, localData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this item has a return value.
|
||||
* @return Whether this item has a return value
|
||||
*/
|
||||
@Override
|
||||
public boolean hasReturnValue() {
|
||||
return object.hasReturnValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the return type of this item.
|
||||
* @return Return type of this item
|
||||
*/
|
||||
@Override
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.UNBOUNDED;
|
||||
|
||||
Reference in New Issue
Block a user