boolean () { final EqualsHashCodeTemplatesManager templatesManager = EqualsHashCodeTemplatesManager.getInstance(); final String notNullCheckPresent = "\\.notNull\\W"; final Pattern pattern = Pattern.compile(notNullCheckPresent); return pattern.matcher(templatesManager.getDefaultEqualsTemplate().getTemplate()).find() || pattern.matcher(templatesManager.getDefaultHashcodeTemplate().getTemplate()).find(); }