Class ReflectionProcessor

java.lang.Object
net.glowstone.util.ReflectionProcessor

public class ReflectionProcessor extends Object
  • Constructor Details

    • ReflectionProcessor

      public ReflectionProcessor(String line, Object... context)
      Creates a new reflection processor instance.

      The processor is able to parse referenced contexts with the following syntax:

      1. $ to reference the first context (equivalent to $1)
      2. $x to reference a specific context, where 'x' is the index of the context (starting from 1)

      To reference a static method/field call, specifying the full package is required.

      Parameters:
      line - the reflection line.
      context - the context(s) of the reflection line
      See Also:
  • Method Details

    • process

      public Object process()
      Processes the given reflective line.
      Returns:
      the resultant value of the reflective line