Class TypeProfileFactory

java.lang.Object
com.blackrook.json.struct.TypeProfileFactory

public class TypeProfileFactory extends Object
A factory that produces type profiles for POJOs and data objects.
Author:
Matthew Tropiano
  • Constructor Details

    • TypeProfileFactory

      public TypeProfileFactory(TypeProfileFactory.MemberPolicy policy)
      Creates a new TypeProfileFactory. This creates type profiles using an additional policy that changes method/field handling for each type.
      Parameters:
      policy - the member policy.
  • Method Details

    • getProfile

      public <T> TypeProfileFactory.Profile<T> getProfile(Class<T> clazz)
      Creates a new profile for a provided type. Generated profiles are stored in memory, and retrieved again by class type.

      This method is thread-safe.

      Type Parameters:
      T - the class type.
      Parameters:
      clazz - the class.
      Returns:
      a new profile.