@SuppressWarnings("unchecked")
    public <T extends PhysicsLink> List<T> listLinks(Class<T> linkType) {
        int numLinks = countLinks();
        List<T> result = new ArrayList<>(numLinks);

        if (torsoLink != null
                && linkType.isAssignableFrom(torsoLink.getClass())) {
            result.add((T) torsoLink);
        }
        for (BoneLink link : boneLinkList) {
            if (linkType.isAssignableFrom(link.getClass())) {
                result.add((T) link);
            }
        }

        return result;
    }
Enumerate all physics links of the specified type managed by this
control.

@param <T> subclass of PhysicsLink
@param linkType the subclass of PhysicsLink to search for (not null)
@return a new array of links (not null, not empty)
jme3-jbullet/src/main/java/com/jme3/bullet/animation/DacLinks.java