@Override
protected Set<Property> getProperties(Class<? extends Object> type) throws IntrospectionException {
Set<Property> returnSet = new HashSet<Property>();
LiquibaseSerializable serialzableType = null;
try {
if (type.equals(ChangeSet.class)) {
serialzableType = new ChangeSet("x", "y", false, false, null, null, null, null);
} else if (LiquibaseSerializable.class.isAssignableFrom(type)) {
serialzableType = (LiquibaseSerializable) type.newInstance();
} else {
return super.getProperties(type);
}
} catch (InstantiationException e) {
throw new UnexpectedLiquibaseException(e);
} catch (IllegalAccessException e) {
throw new UnexpectedLiquibaseException(e);
}
for (String property : serialzableType.getSerializableFields()) {
LiquibaseSerializable.SerializationType fieldType = serialzableType.getSerializableFieldType(property);
returnSet.add(new LiquibaseProperty(property, String.class, String.class));
}
return returnSet;
}