Package de.geolykt.starloader.transformers

# Class StarplaneAnnotationsInlineTransformer

java.lang.Object
de.geolykt.starloader.transformers.ASMTransformer
de.geolykt.starloader.transformers.StarplaneAnnotationsInlineTransformer

All Implemented Interfaces:
  `Comparable<ASMTransformer>`

public class StarplaneAnnotationsInlineTransformer extends 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
Constructor
Description
`StarplaneAnnotationsInlineTransformer()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`accept(@NotNull org.objectweb.asm.tree.ClassNode node)`
Transforms the provided `ClassNode` to the transformer's liking.
`int`
`getPriority()`
Obtains the priority of this transformer.
`boolean`
`isValidTarget(@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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### StarplaneAnnotationsInlineTransformer

public StarplaneAnnotationsInlineTransformer()

## Method Details

### accept

public boolean accept(@NotNull @NotNull org.objectweb.asm.tree.ClassNode node)
Description copied from class: `ASMTransformer`
Transforms the provided `ClassNode` to 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:
  `accept` in class `ASMTransformer`
Parameters:
  `node` - The node to transform
Returns:
  True if the node has been modified.

### isValidTarget

public boolean isValidTarget(@NotNull @NotNull String internalName)
Description copied from class: `ASMTransformer`
Checks whether the given class denoted by the internal name would be a valid potential transformation target. If this method returns false, then `ASMTransformer.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:
  `isValidTarget` in class `ASMTransformer`
Parameters:
  `internalName` - The internal name of the class
Returns:
  Whether it is a potential target
See Also:
  - `Type.getInternalName()`

### getPriority

public int getPriority()
Description copied from class: `ASMTransformer`
Obtains 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: `ASMMixinTransformer`
- -9_900: Most SLAPI transformers
- 100: SLAPI GL transformer (intercepts GL11#glScissor calls)

Overrides:
  `getPriority` in class `ASMTransformer`
Returns:
  The priority of the transformer