for (ParameterizedInterfaceModel pim : cm.getParameterizedInterfaces()) { if (isContract(pim.getRawInterface())) { contracts.add(pim.getName()); ClassModel currentClassModel = cm.getParent(); while(currentClassModel!=null) { if (isContract(currentClassModel)) { contracts.add(currentClassModel.getName()); currentClassModel = currentClassModel.getParent(); for (InterfaceModel im : cm.getInterfaces()) { getAllContractInterfaces(im, contracts); ClassModel parent = cm.getParent(); if (null == parent) { } else if (!parent.getName().equals(Object.class.getName())) { findContracts(parent, contracts, annotationTypeInterfaces);
@Override public Collection<ClassModel> allImplementations() { Collection<ClassModel> result = new HashSet<ClassModel>(); result.addAll(getProxy().getImplementations()); for (ClassModel cm : getProxy().getImplementations()) { result.addAll(cm.allSubTypes()); } return Collections.unmodifiableCollection(result); }
@Override protected void print(StringBuffer sb) { super.print(sb); sb.append(", implementors=["); for (ClassModel cm : getProxy().getImplementations()) { sb.append(" ").append(cm.getName()); } sb.append("]"); } }
simpleSearch = searchString.toLowerCase(); for (ClassModel classObj : classArray) { if (classObj.getName().toLowerCase().contains(simpleSearch) || classObj.getCity().toLowerCase().contains(simpleSearch) || classObj.getStaffName().toLowerCase().contains(simpleSearch) || classObj.getLocationName().toLowerCase().contains(simpleSearch)) {
classes = ((InterfaceModel) type).allImplementations(); } else { classes = ((ClassModel) type).allSubTypes(); resultSet.add(cl.loadClass(classModel.getName())); } catch (Throwable t) { if (log.isLoggable(Level.WARNING)) { log.log(Level.WARNING, LogFacade.CLASS_LOADING_ERROR, new Object[] {classModel.getName(), t.toString()});
for (FieldModel f : ((ClassModel) t).getFields()) { generate(f);
public void findClassContracts(ClassModel cm, Set<String> interfaces, Set<String> annotationTypeInterfaces) { for (InterfaceModel im : cm.getInterfaces()) { if (isContract(im)) { interfaces.add(im.getName()); } } findContractsFromAnnotations(cm, interfaces, annotationTypeInterfaces); }
@Override protected void print(StringBuffer sb) { super.print(sb); sb.append(", implementors=["); for (ClassModel cm : getProxy().getImplementations()) { sb.append(" ").append(cm.getName()); } sb.append("]"); } }
for (FieldModel f : ((ClassModel) t).getFields()) { generate(f);
public void findContracts(ClassModel cm, Set<String> interfaces, Set<String> annotationTypeInterfaces) { // It is questionable that the indexes will contain the fully qualified // parameterized type as well as the raw type but it's safer for // backward compatibility. for (ParameterizedInterfaceModel pim : cm.getParameterizedInterfaces()) { if (isContract(pim.getRawInterface())) { interfaces.add(pim.getName()); } } for (InterfaceModel im : cm.getInterfaces()) { getAllContractInterfaces(im, interfaces); } findContractsFromAnnotations(cm, interfaces, annotationTypeInterfaces); // walk parent chain too ClassModel parent = cm.getParent(); if (null == parent) { // at this point, we check all interfaces to see if they have super interfaces Set<String> newIfaces = new LinkedHashSet<String>(); for (String ifaceName : interfaces) { InterfaceModel iface = types.getBy(InterfaceModel.class, ifaceName); getAllContractInterfaces(iface, newIfaces); } interfaces.addAll(newIfaces); } else if (!parent.getName().equals(Object.class.getName())) { findContracts(parent, interfaces, annotationTypeInterfaces); } }
@Override public Collection<ClassModel> allImplementations() { Collection<ClassModel> result = new HashSet<ClassModel>(); result.addAll(getProxy().getImplementations()); for (ClassModel cm : getProxy().getImplementations()) { result.addAll(cm.allSubTypes()); } return Collections.unmodifiableCollection(result); }