Class StarplaneAnnotationsInlineTransformer
java.lang.Object
de.geolykt.starloader.transformers.ASMTransformer
de.geolykt.starloader.transformers.StarplaneAnnotationsInlineTransformer
- All Implemented Interfaces:
Comparable<ASMTransformer>
Simple transformer that inlines the proper values from the starplane-annotations string source, without remapping them
- that is it uses the references as-is.
Should only be used in a development environment as this transformer is unlikely to work in a production environment, where a remapping step needs to be added on top.
- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(@NotNull org.objectweb.asm.tree.ClassNode node) Transforms the providedClassNodeto the transformer's liking.intObtains the priority of this transformer.booleanisValidTarget(@NotNull String internalName) Checks whether the given class denoted by the internal name would be a valid potential transformation target.Methods inherited from class de.geolykt.starloader.transformers.ASMTransformer
compareTo, isValid
-
Constructor Details
-
StarplaneAnnotationsInlineTransformer
public StarplaneAnnotationsInlineTransformer()
-
-
Method Details
-
accept
public boolean accept(@NotNull @NotNull org.objectweb.asm.tree.ClassNode node) Description copied from class:ASMTransformerTransforms the providedClassNodeto the transformer's liking. Must return true if the class node has been modified, should it not returns false, then the transformation MAY be discarded, however it could also not be discarded. It is best to assume that both are equally possible events.- Specified by:
acceptin classASMTransformer- Parameters:
node- The node to transform- Returns:
- True if the node has been modified.
-
isValidTarget
Description copied from class:ASMTransformerChecks whether the given class denoted by the internal name would be a valid potential transformation target. If this method returns false, thenASMTransformer.accept(ClassNode)should NOT be called, however if it returns true, then it may get called.ASMTransformer.accept(ClassNode)will not always return true when this method does, however that method should never return true when this method returns false.- Specified by:
isValidTargetin classASMTransformer- Parameters:
internalName- The internal name of the class- Returns:
- Whether it is a potential target
- See Also:
-
getPriority
public int getPriority()Description copied from class:ASMTransformerObtains the priority of this transformer. The priority is used to note when a transformer should be applied in relation to other transformers. Should two transformers have the same priority, the order will be arbitrary.Transformers with a lower numeric priority value are run first. That is, the higher the priority of a transformer, the more "final" it's descision is.
Important transform priorities are:
- -10_010:
ReversibleAccessSetterTransformer - -10_010:
StarplaneAnnotationsInlineTransformer - -10_000:
SLLCTMixinTransformer - -9_900: Most SLAPI transformers
- 100: SLAPI GL transformer (intercepts GL11#glScissor calls)
- Overrides:
getPriorityin classASMTransformer- Returns:
- The priority of the transformer
- -10_010:
-