Class NamedDefinitionParser

java.lang.Object
me.ahoo.cosid.accessor.parser.NamedDefinitionParser
All Implemented Interfaces:
FieldDefinitionParser

public class NamedDefinitionParser extends Object implements FieldDefinitionParser
Parses fields by name to create IdDefinition.

Creates an ID definition for fields matching the specified name.

  • Constructor Details

    • NamedDefinitionParser

      public NamedDefinitionParser(String idFieldName)
      Creates a parser for the specified field name.
      Parameters:
      idFieldName - the field name to match
  • Method Details

    • parse

      public IdDefinition parse(List<Class<?>> lookupClassList, Field field)
      Description copied from interface: FieldDefinitionParser
      Parses a field to create its ID definition.
      Specified by:
      parse in interface FieldDefinitionParser
      Parameters:
      lookupClassList - list of classes in the hierarchy
      field - the field to parse
      Returns:
      the ID definition or null