Class BannedGenerator

java.lang.Object
com.comphenix.protocol.reflect.instances.BannedGenerator
All Implemented Interfaces:
InstanceProvider

public class BannedGenerator extends Object implements InstanceProvider
Generator that ensures certain types will never be created.
  • Constructor Details

    • BannedGenerator

      public BannedGenerator(AbstractFuzzyMatcher<Class<?>> classMatcher)
      Construct a generator that ensures any class that matches the given matcher is never constructed.
      Parameters:
      classMatcher - - a class matcher.
    • BannedGenerator

      public BannedGenerator(Class<?>... classes)
  • Method Details

    • create

      public Object create(@Nullable Class<?> type)
      Description copied from interface: InstanceProvider
      Create an instance given a type, if possible.
      Specified by:
      create in interface InstanceProvider
      Parameters:
      type - - type to create.
      Returns:
      The instance, or NULL if the type cannot be created.