public final class TemplateUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Feature.Template |
instantiateTemplate(Feature feat)
This attempts to divine the 'best' template class for a feature and return
a new instance readly for pupulating.
|
static Feature.Template |
makeTemplate(Feature feat) |
static void |
populate(Feature.Template templ,
Feature feat)
This attempts to populate the fields of a template using
the publically accessible information in a feature.
|
public static Feature.Template instantiateTemplate(Feature feat) throws BioException
This will (hopefully) be the most derived feature interface implemented by a feature class. This code assumes that feature interfaces are singly inherited. Of course, with the current template system, it is a fairly safe assumption.
BioException
public static void populate(Feature.Template templ, Feature feat) throws BioException
templ
- the Feature.Template instance to populatefeat
- the Feature to read info fromBioException
public static Feature.Template makeTemplate(Feature feat) throws BioException
BioException
Copyright © 2014 BioJava. All rights reserved.