FeatureDistanceModel instance;
try
{
- instance = this.getClass().newInstance();
+ instance = this.getClass().getDeclaredConstructor().newInstance();
instance.configureFromAlignmentView(view);
return instance;
} catch (InstantiationException | IllegalAccessException e)
System.err.println("Error in " + getClass().getName()
+ ".getInstance(): " + e.getMessage());
return null;
+ } catch (ReflectiveOperationException roe)
+ {
+ return null;
}
}
protected Map<SeqCigar, Set<String>> findFeatureTypesAtColumn(
SeqCigar[] seqs, int columnPosition)
{
- Map<SeqCigar, Set<String>> sfap = new HashMap<SeqCigar, Set<String>>();
+ Map<SeqCigar, Set<String>> sfap = new HashMap<>();
for (SeqCigar seq : seqs)
{
int spos = seq.findPosition(columnPosition);
/*
* position is not a gap
*/
- Set<String> types = new HashSet<String>();
+ Set<String> types = new HashSet<>();
List<SequenceFeature> sfs = fr.findFeaturesAtResidue(
seq.getRefSeq(), spos);
for (SequenceFeature sf : sfs)