// Path: centipede-parser/src/main/java/com/ontology2/centipede/errors/MisconfigurationException.java
// public class MisconfigurationException extends RuntimeException {
//     public MisconfigurationException() {
//     }
// 
//     public MisconfigurationException(String message) {
//         super(message);
//     }
// 
//     public MisconfigurationException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public MisconfigurationException(Throwable cause) {
//         super(cause);
//     }
// 
//     public MisconfigurationException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
//         super(message, cause, enableSuppression, writableStackTrace);
//     }
// }


import com.ontology2.centipede.errors.MisconfigurationException;
import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.TypeDescriptor;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
package com.ontology2.centipede.parser;



public class RWOption  {
    private final Field field;
    private final Class substitutor;

    private final boolean isRequired;
    private String name;
    private String defaultValue;
    private String description;
    private Type type;

    public RWOption(Field f) {
        Option o=f.getAnnotation(Option.class);
        this.isRequired=(f.getAnnotation(Required.class)!=null);

        this.field=f;
        this.name=o.name();
        this.defaultValue=o.defaultValue();
        this.description=o.description();
        if(!Object.class.equals(o.contextualConverter())
            &&  !ContextualConverter.class.isAssignableFrom(o.contextualConverter()))
// Path: centipede-parser/src/main/java/com/ontology2/centipede/errors/MisconfigurationException.java
// public class MisconfigurationException extends RuntimeException {
//     public MisconfigurationException() {
//     }
// 
//     public MisconfigurationException(String message) {
//         super(message);
//     }
// 
//     public MisconfigurationException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public MisconfigurationException(Throwable cause) {
//         super(cause);
//     }
// 
//     public MisconfigurationException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
//         super(message, cause, enableSuppression, writableStackTrace);
//     }
// }


// Path: centipede-parser/src/main/java/com/ontology2/centipede/parser/RWOption.java
import com.ontology2.centipede.errors.MisconfigurationException;
import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.TypeDescriptor;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;

package com.ontology2.centipede.parser;



public class RWOption  {
    private final Field field;
    private final Class substitutor;

    private final boolean isRequired;
    private String name;
    private String defaultValue;
    private String description;
    private Type type;

    public RWOption(Field f) {
        Option o=f.getAnnotation(Option.class);
        this.isRequired=(f.getAnnotation(Required.class)!=null);

        this.field=f;
        this.name=o.name();
        this.defaultValue=o.defaultValue();
        this.description=o.description();
        if(!Object.class.equals(o.contextualConverter())
            &&  !ContextualConverter.class.isAssignableFrom(o.contextualConverter()))
            throw new MisconfigurationException("A contextualConverter must be a ContextualConverter for option "+name);