Search in sources :

Example 1 with Categorized

use of pcgen.cdom.base.Categorized in project pcgen by PCGen.

the class AbstractReferenceContext method forget.

public <T extends Loadable> boolean forget(T obj) {
    if (CATEGORIZED_CLASS.isAssignableFrom(obj.getClass())) {
        Class cl = obj.getClass();
        Categorized cdo = (Categorized) obj;
        if (hasManufacturer(cl, cdo.getCDOMCategory())) {
            // Work around a bug in the Eclipse 3.7.0/1 compiler by explicitly extracting a Category<?>
            return getManufacturer(cl, (Category<?>) cdo.getCDOMCategory()).forgetObject(obj);
        }
    } else {
        if (hasManufacturer(obj.getClass())) {
            return getManufacturer((Class<T>) obj.getClass()).forgetObject(obj);
        }
    }
    return false;
}
Also used : Categorized(pcgen.cdom.base.Categorized) Category(pcgen.cdom.base.Category) SubClassCategory(pcgen.cdom.enumeration.SubClassCategory) PCClass(pcgen.core.PCClass) SubClass(pcgen.core.SubClass)

Aggregations

Categorized (pcgen.cdom.base.Categorized)1 Category (pcgen.cdom.base.Category)1 SubClassCategory (pcgen.cdom.enumeration.SubClassCategory)1 PCClass (pcgen.core.PCClass)1 SubClass (pcgen.core.SubClass)1