private Collection<MetaClass> findRelevantClasses(final IOCProcessingContext processingContext) { final Collection<MetaClass> allMetaClasses = new HashSet<>(); allMetaClasses.addAll(MetaClassFactory.getAllCachedClasses()); allMetaClasses.remove(MetaClassFactory.get(Object.class)); return allMetaClasses; }
private static void addConfiguredNonBindableTypes(final Set<MetaClass> nonbindableClasses, String value) { final Set<String> patterns = new LinkedHashSet<>(); for (final String s : value.split(" ")) { final String singleValue = s.trim(); if (singleValue.endsWith("*")) { patterns.add(singleValue); } else { try { nonbindableClasses.add(MetaClassFactory.get(singleValue)); } catch (final Exception e) { throw new RuntimeException("Could not find class defined in ErraiApp.properties as nonbindable type: " + s); } } } if (!patterns.isEmpty()) { final SimplePackageFilter filter = new SimplePackageFilter(patterns); MetaClassFactory .getAllCachedClasses() .stream() .filter(mc -> filter.apply(mc.getFullyQualifiedName())) .collect(toCollection(() -> nonbindableClasses)); } }
private static void addNonSerializableTypes(final Set<MetaClass> nonportableClasses, final String value) { final Set<String> patterns = new LinkedHashSet<>(); for (final String s : value.split(" ")) { final String singleValue = s.trim(); if (singleValue.endsWith("*")) { patterns.add(singleValue); } else { try { nonportableClasses.add(MetaClassFactory.get(singleValue)); } catch (final Exception e) { throw new RuntimeException("could not find class defined in ErraiApp.properties as nonserializable: " + s, e); } } } if (!patterns.isEmpty()) { final SimplePackageFilter filter = new SimplePackageFilter(patterns); MetaClassFactory .getAllCachedClasses() .stream() .filter(mc -> filter.apply(mc.getFullyQualifiedName())) .collect(toCollection(() -> nonportableClasses)); } }
final Collection<String> classNames = new ArrayList<String>(); for (MetaClass clazz : MetaClassFactory.getAllCachedClasses()) { final String fqcn = clazz.getFullyQualifiedName(); final String pkg = clazz.getPackageName();
private static void addConfiguredBindableTypes(final Set<MetaClass> bindableClasses, String value) { final Set<String> patterns = new LinkedHashSet<>(); for (final String s : value.split(" ")) { final String singleValue = s.trim(); if (singleValue.endsWith("*")) { patterns.add(singleValue); } else { try { bindableClasses.add(MetaClassFactory.get(singleValue)); } catch (final Exception e) { throw new RuntimeException("Could not find class defined in ErraiApp.properties as bindable type: " + s); } } } if (!patterns.isEmpty()) { final SimplePackageFilter filter = new SimplePackageFilter(patterns); MetaClassFactory .getAllCachedClasses() .stream() .filter(mc -> filter.apply(mc.getFullyQualifiedName()) && validateWildcard(mc)) .collect(toCollection(() -> bindableClasses)); } }
private static void addConfiguredNonBindableTypes(final Set<MetaClass> nonbindableClasses, String value) { final Set<String> patterns = new LinkedHashSet<>(); for (final String s : value.split(" ")) { final String singleValue = s.trim(); if (singleValue.endsWith("*")) { patterns.add(singleValue); } else { try { nonbindableClasses.add(MetaClassFactory.get(singleValue)); } catch (final Exception e) { throw new RuntimeException("Could not find class defined in ErraiApp.properties as nonbindable type: " + s); } } } if (!patterns.isEmpty()) { final SimplePackageFilter filter = new SimplePackageFilter(patterns); MetaClassFactory .getAllCachedClasses() .stream() .filter(mc -> filter.apply(mc.getFullyQualifiedName())) .collect(toCollection(() -> nonbindableClasses)); } }
private static void addNonSerializableTypes(final Set<MetaClass> nonportableClasses, final String value) { final Set<String> patterns = new LinkedHashSet<>(); for (final String s : value.split(" ")) { final String singleValue = s.trim(); if (singleValue.endsWith("*")) { patterns.add(singleValue); } else { try { nonportableClasses.add(MetaClassFactory.get(singleValue)); } catch (final Exception e) { throw new RuntimeException("could not find class defined in ErraiApp.properties as nonserializable: " + s, e); } } } if (!patterns.isEmpty()) { final SimplePackageFilter filter = new SimplePackageFilter(patterns); MetaClassFactory .getAllCachedClasses() .stream() .filter(mc -> filter.apply(mc.getFullyQualifiedName())) .collect(toCollection(() -> nonportableClasses)); } }
final Collection<String> classNames = new ArrayList<String>(); for (MetaClass clazz : MetaClassFactory.getAllCachedClasses()) { final String fqcn = clazz.getFullyQualifiedName(); final String pkg = clazz.getPackageName();
private static void addConfiguredBindableTypes(final Set<MetaClass> bindableClasses, String value) { final Set<String> patterns = new LinkedHashSet<>(); for (final String s : value.split(" ")) { final String singleValue = s.trim(); if (singleValue.endsWith("*")) { patterns.add(singleValue); } else { try { bindableClasses.add(MetaClassFactory.get(singleValue)); } catch (final Exception e) { throw new RuntimeException("Could not find class defined in ErraiApp.properties as bindable type: " + s); } } } if (!patterns.isEmpty()) { final SimplePackageFilter filter = new SimplePackageFilter(patterns); MetaClassFactory .getAllCachedClasses() .stream() .filter(mc -> filter.apply(mc.getFullyQualifiedName()) && validateWildcard(mc)) .collect(toCollection(() -> bindableClasses)); } }
final SimplePackageFilter filter = new SimplePackageFilter(patterns); MetaClassFactory .getAllCachedClasses() .stream() .filter(mc -> filter.apply(mc.getFullyQualifiedName()) && validateWildcardSerializable(mc))
final SimplePackageFilter filter = new SimplePackageFilter(patterns); MetaClassFactory .getAllCachedClasses() .stream() .filter(mc -> filter.apply(mc.getFullyQualifiedName()) && validateWildcardSerializable(mc))
for (final MetaClass metaClass : MetaClassFactory.getAllCachedClasses()) { for (final MetaField metaField : metaClass.getDeclaredFields()) { if (metaField.isAnnotationPresent(annotation)) {
for (final MetaClass metaClass : MetaClassFactory.getAllCachedClasses()) { if (metaClass.isAnnotationPresent(annotation)) { result.add(metaClass);
for (final MetaClass metaClass : MetaClassFactory.getAllCachedClasses()) { for (final MetaField metaField : metaClass.getDeclaredFields()) { if (metaField.isAnnotationPresent(annotation)) {
for (final MetaClass metaClass : MetaClassFactory.getAllCachedClasses()) { if (metaClass.isAnnotationPresent(annotation)) { result.add(metaClass);
for (final MetaClass metaClass : MetaClassFactory.getAllCachedClasses()) { for (final MetaMethod metaMethod : metaClass.getDeclaredMethods()) { if (metaMethod.isAnnotationPresent(annotation)) {
for (final MetaClass metaClass : MetaClassFactory.getAllCachedClasses()) { for (final MetaMethod metaMethod : metaClass.getDeclaredMethods()) { if (metaMethod.isAnnotationPresent(annotation)) {
for (final MetaClass metaClass : MetaClassFactory.getAllCachedClasses()) { for (final MetaMethod method : metaClass.getDeclaredMethods()) { for (final MetaParameter parameter : method.getParameters()) {
for (final MetaClass metaClass : MetaClassFactory.getAllCachedClasses()) { for (final MetaMethod method : metaClass.getDeclaredMethods()) { for (final MetaParameter parameter : method.getParameters()) {