Class UnpickV2Writer
java.lang.Object
daomephsta.unpick.constantmappers.datadriven.parser.v2.UnpickV2Writer
- All Implemented Interfaces:
UnpickV2Reader.Visitor
A visitor that generates .unpick v2 format text. Useful for programmatically writing .unpick v2 format files;
or remapping them, when used as the delegate for an instance of
UnpickV2Remapper.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidVisits the start of the file.voidvisitFlagConstantDefinition(String group, String owner, String name, String value, String descriptor) Visits a flag constant definition (start tokenflag).
valueanddescriptorwill either both have a value or both be null.voidvisitSimpleConstantDefinition(String group, String owner, String name, String value, String descriptor) Visits a simple constant definition (start tokenconstant).
valueanddescriptorwill either both have a value or both be null.visitTargetMethodDefinition(String owner, String name, String descriptor) Visits a target method definition (start tokentarget_method).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface daomephsta.unpick.constantmappers.datadriven.parser.v2.UnpickV2Reader.Visitor
endVisit, visitLineNumber
-
Constructor Details
-
UnpickV2Writer
public UnpickV2Writer()
-
-
Method Details
-
startVisit
public void startVisit()Description copied from interface:UnpickV2Reader.VisitorVisits the start of the file. This is the first method called.- Specified by:
startVisitin interfaceUnpickV2Reader.Visitor
-
visitFlagConstantDefinition
public void visitFlagConstantDefinition(String group, String owner, String name, String value, String descriptor) Description copied from interface:UnpickV2Reader.VisitorVisits a flag constant definition (start tokenflag).
valueanddescriptorwill either both have a value or both be null.- Specified by:
visitFlagConstantDefinitionin interfaceUnpickV2Reader.Visitor- Parameters:
group- the id of the constant's constant group.owner- the internal name of the constant's owner class.name- the constant's Java identifier.value- the constant's value as aString, or null if it is not specified (will be resolved at runtime).descriptor- the constant's descriptor, or null if it is not specified (will be resolved at runtime).
-
visitSimpleConstantDefinition
public void visitSimpleConstantDefinition(String group, String owner, String name, String value, String descriptor) Description copied from interface:UnpickV2Reader.VisitorVisits a simple constant definition (start tokenconstant).
valueanddescriptorwill either both have a value or both be null.- Specified by:
visitSimpleConstantDefinitionin interfaceUnpickV2Reader.Visitor- Parameters:
group- the id of the constant's constant group.owner- the internal name of the constant's owner class.name- the constant's Java identifier.value- the constant's value as aString, or null if it is not specified (will be resolved at runtime).descriptor- the constant's descriptor, or null if it is not specified (will be resolved at runtime).
-
visitTargetMethodDefinition
public UnpickV2Reader.TargetMethodDefinitionVisitor visitTargetMethodDefinition(String owner, String name, String descriptor) Description copied from interface:UnpickV2Reader.VisitorVisits a target method definition (start tokentarget_method).- Specified by:
visitTargetMethodDefinitionin interfaceUnpickV2Reader.Visitor- Parameters:
owner- the internal name of the method's owner class.name- the method's Java identifier.descriptor- the method's descriptor.- Returns:
- an instance of
TargetMethodDefinitionVisitorthat should visit the parameter and return groups of the target method definition, or null if they should not be visited.
-
getOutput
-