コード例 #1
0
  /**
   * INTERNAL: Process a the XML defined type converters and check for a TypeConverter annotation.
   */
  protected void processTypeConverters() {
    // Check for XML defined type converters.
    for (TypeConverterMetadata typeConverter : m_typeConverters) {
      m_project.addConverter(typeConverter);
    }

    // Check for an TypeConverter annotation.
    MetadataAnnotation typeConverter = getAnnotation(TypeConverter.class);
    if (typeConverter != null) {
      m_project.addConverter(new TypeConverterMetadata(typeConverter, getAccessibleObject()));
    }
  }
コード例 #2
0
  /**
   * INTERNAL: Process the XML defined struct converters and check for a StructConverter annotation.
   */
  protected void processStructConverter() {
    // Check for XML defined struct converters.
    for (StructConverterMetadata structConverter : m_structConverters) {
      m_project.addConverter(structConverter);
    }

    // Check for a StructConverter annotation.
    MetadataAnnotation converter = getAnnotation(StructConverter.class);
    if (converter != null) {
      m_project.addConverter(new StructConverterMetadata(converter, getAccessibleObject()));
    }
  }
コード例 #3
0
  /** INTERNAL: Process the XML defined converters and check for a Converter annotation. */
  protected void processCustomConverters() {
    // Check for XML defined converters.
    for (ConverterMetadata converter : m_converters) {
      m_project.addConverter(converter);
    }

    // Check for a Converter annotation.
    MetadataAnnotation converter = getAnnotation(Converter.class);
    if (converter != null) {
      m_project.addConverter(new ConverterMetadata(converter, getAccessibleObject()));
    }
  }
コード例 #4
0
  /**
   * INTERNAL: Process the XML defined object type converters and check for an ObjectTypeConverter
   * annotation.
   */
  protected void processObjectTypeConverters() {
    // Check for XML defined object type converters.
    for (ObjectTypeConverterMetadata objectTypeConverter : m_objectTypeConverters) {
      m_project.addConverter(objectTypeConverter);
    }

    // Check for an ObjectTypeConverter annotation.
    MetadataAnnotation objectTypeConverter = getAnnotation(ObjectTypeConverter.class);
    if (objectTypeConverter != null) {
      m_project.addConverter(
          new ObjectTypeConverterMetadata(objectTypeConverter, getAccessibleObject()));
    }
  }