Class AbstractProxy.Builder<T extends AbstractProxy>

java.lang.Object
ftbsc.lll.proxies.AbstractProxy.Builder<T>
Type Parameters:
T - the type of proxy
Direct Known Subclasses:
FieldProxy.Builder, MethodProxy.Builder
Enclosing class:
AbstractProxy

public abstract static class AbstractProxy.Builder<T extends AbstractProxy> extends Object
A Builder for the generic proxy.
  • Field Details

    • name

      protected String name
      The name of the element.
    • modifiers

      protected int modifiers
      The modifiers of the element, as a packed int.
    • parent

      protected QualifiableProxy parent
      The fully qualified name of the parent.
    • descriptor

      protected String descriptor
      The descriptor of the element.
  • Constructor Details

    • Builder

      protected Builder(String name)
      The constructor.
      Parameters:
      name - the name of the element
  • Method Details

    • addModifier

      public AbstractProxy.Builder<T> addModifier(int newModifier)
      Parameters:
      newModifier - the modifier to add
      Returns:
      the current state of the builder
    • setModifiers

      public AbstractProxy.Builder<T> setModifiers(int newModifier)
      Parameters:
      newModifier - the new modifier value
      Returns:
      the current state of the builder
    • setParent

      public AbstractProxy.Builder<T> setParent(QualifiableProxy parent)
      Parameters:
      parent - the QualifiableProxy representing the parent
      Returns:
      the current state of the builder
    • setDescriptor

      public AbstractProxy.Builder<T> setDescriptor(String descriptor)
      Sets Type for this element from the descriptor, passed as a String.
      Parameters:
      descriptor - the descriptor passed as a String
      Returns:
      the builder's state after the change
    • setType

      public AbstractProxy.Builder<T> setType(org.objectweb.asm.Type type)
      Parameters:
      type - the Type corresponding to the element
      Returns:
      the current state of the builder
    • build

      public abstract T build()
      Returns:
      the built proxy object