More documentation.

This commit is contained in:
Jindra Petřík
2024-08-08 19:27:14 +02:00
parent 68954e714d
commit b57e38e387
286 changed files with 11752 additions and 3576 deletions
@@ -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;