} else {
jc = ((JavaMethod) reference).getJavaClass();
}
// make an inference semantics link
Example example = factory.createExample();
example.setDescription(description);
example.setReference(reference);
// make a new ModelReference
ModelReference ref = factory.createModelReference();
ref.setPlugin(jc.getPlugin());
ref.setPackage(jc.getPackage());
ref.setName(jc.getName());
root.getReferences().add(ref);
example.setExampleModel(ref);
// make a new FileReference for the example .html
// as per issue 128, this will be in a new location
FileReference file = factory.createFileReference();
file.setPlugin(examplePlugin);
file.setPackage(jc.getName());
file.setName(jc.getName() + ".html");
root.getReferences().add(file);
example.setExampleLocation(file);
target.getExamples().add(example);
} else {
throw new SemanticHandlerException("Unknown example reference: " + reference + ", class: " + reference.getClass());