public Set<TypeDef> getDefinitions(AttributeKey<Boolean>... attributeKeys) { Set<TypeDef> result = new LinkedHashSet<TypeDef>(); for (TypeDef candidate : definitions.values()) { boolean matches = true; for (AttributeKey<Boolean> attributeKey : attributeKeys) { if (!candidate.hasAttribute(attributeKey) || !(candidate.getAttribute(attributeKey))) { matches = false; break; } } if (matches) { result.add(candidate); } } return Collections.unmodifiableSet(result); }
Buildable buildable = typeDef.getAttribute(BUILDABLE); ExternalBuildables externalBuildables = typeDef.getAttribute(EXTERNAL_BUILDABLE); if (buildable != null) { for (final Inline inline : buildable.inline()) {
public Set<TypeDef> getDefinitions(String... flags) { Set<TypeDef> result = new LinkedHashSet<TypeDef>(); for (TypeDef candidate : definitions.values()) { boolean matches = true; for (String flag :flags) { AttributeKey<Boolean> attributeKey = new AttributeKey<Boolean>(flag, Boolean.class); if (!candidate.hasAttribute(attributeKey) || !(candidate.getAttribute(attributeKey))) { matches = false; break; } } if (matches) { result.add(candidate); } } return Collections.unmodifiableSet(result); }
for (TypeDef also : typeDef.getAttribute(ADDITIONAL_BUILDABLES)) { builderContext.getDefinitionRepository().register(also); builderContext.getBuildableRepository().register(also); for (TypeDef also : typeDef.getAttribute(ADDITIONAL_TYPES)) { builderContext.getDefinitionRepository().register(also); generateFromResources(also, Constants.DEFAULT_SOURCEFILE_TEMPLATE_LOCATION);
public TypeDef apply(final TypeDef item) { final boolean validationEnabled = item.hasAttribute(VALIDATION_ENABLED) ? item.getAttribute(VALIDATION_ENABLED) : false; final Modifier[] modifiers = item.isAbstract() ? new Modifier[]{Modifier.PUBLIC, Modifier.ABSTRACT}