}
public Constructor parseConstructor(final String filePath) {
ConstructorParser parser = new ConstructorParser(new ConstructorParser.IConstructorFactoryFactory() {
public ConstructorParser.IConstructorFactory getFactory(int phase) {
return new ConstructorFactory();
}
});
ParsingResult result = parser.parse(new FileSource(filePath));
if (!result.success()) {
return null;
}
ConstructorFactory constructorFactory = (ConstructorFactory)parser.getFactory();
Constructor constructor = constructorFactory.getConstructor();
return constructor;
}