public static List<ClassRef> alsoImportAsList(Attributeable attributeable) { List<ClassRef> result = new ArrayList<ClassRef>(); if (attributeable.hasAttribute(ALSO_IMPORT)) { result.addAll(attributeable.getAttribute(ALSO_IMPORT)); } return result; }
public static boolean isCardinalityMultiple(Attributeable type) { return type.getAttributes().containsKey(CARDINALITY_MULTIPLE) && (type.getAttributes().get(CARDINALITY_MULTIPLE) instanceof Boolean) && (Boolean) type.getAttributes().get(CARDINALITY_MULTIPLE); }
public static boolean isTransition(Attributeable type) { return type.getAttributes().containsKey(IS_TRANSITION) && (type.getAttributes().get(IS_TRANSITION) instanceof Boolean) && (Boolean) type.getAttributes().get(IS_TRANSITION); }
public static boolean isEntryPoint(Attributeable type) { return type.getAttributes().containsKey(IS_ENTRYPOINT) && (type.getAttributes().get(IS_ENTRYPOINT) instanceof Boolean) && (Boolean) type.getAttributes().get(IS_ENTRYPOINT); }
public static boolean isTerminal(Attributeable type) { return type.getAttributes().containsKey(IS_TERMINAL) && (type.getAttributes().get(IS_TERMINAL) instanceof Boolean) && (Boolean) type.getAttributes().get(IS_TERMINAL); }
public static boolean isGeneric(Attributeable type) { return type.getAttributes().containsKey(IS_GENERIC) && (type.getAttributes().get(IS_GENERIC) instanceof Boolean) && (Boolean) type.getAttributes().get(IS_GENERIC); }
public static boolean isBeginScope(Attributeable type) { return type.getAttributes().containsKey(BEGIN_SCOPE); }
public static boolean isEndScope(Attributeable type) { return type.getAttributes().containsKey(END_SCOPE); }
public static final Set<TypeDef> getTerminatingTypes(Attributeable type) { Set<TypeDef> result = new LinkedHashSet<TypeDef>(); if (type.getAttributes().containsKey(TERMINATING_TYPES)) { result.addAll((Collection<TypeDef>) type.getAttributes().get(TERMINATING_TYPES)); } if (type.getAttributes().containsKey(IS_COMPOSITE) && (Boolean) type.getAttributes().get(IS_TERMINAL) && !(type.getAttributes().get(ORIGINAL_RETURN_TYPE).equals(TRANSPARENT))) { result.add((TypeDef) type.getAttributes().get(ORIGINAL_RETURN_TYPE)); } return result; }