Пример #1
0
 public static void initTimeNonInherited() {
   FeWrapperSpec.ABSTRACTWRAPPER("Wrapper", null, FE_WRAPPER);
   /*
   udanax-top.st:23588:FeWrapper class methodsFor: 'smalltalk: initialization'!
   initTimeNonInherited
   	FeWrapperSpec ABSTRACTWRAPPER: 'Wrapper' with: NULL with: #FeWrapper!
   */
 }
Пример #2
0
  /** Essential. Return TRUE if this is wrapped as the given spec, or any one of its subtypes */
  public boolean isWrapperOf(FeWrapperSpec spec) {
    return mySpec.isSubSpecOf(spec);
    /*
    udanax-top.st:23554:FeWrapper methodsFor: 'accessing'!
    {BooleanVar} isWrapperOf: spec {FeWrapperSpec}
    	"Essential. Return TRUE if this is wrapped as the given spec, or any one of its subtypes"

    	^mySpec isSubSpecOf: spec!
    */
  }
Пример #3
0
  /**
   * If there is a SubEdition at a key in an edition, and if a spec is supplied, that it can be
   * certified as the given type
   */
  public static boolean checkSubEdition(
      FeEdition parent, Position key, FeWrapperSpec spec, boolean required) {
    FeRangeElement value;
    value = parent.fetch(key);
    if (value == null) {
      return !required;
    }
    return (value instanceof FeEdition) && (spec == null || (spec.certify(((FeEdition) value))));
    /*
    udanax-top.st:23624:FeWrapper class methodsFor: 'protected: checking'!
    {BooleanVar} checkSubEdition: parent {FeEdition}
    	with: key {Position}
    	with: spec {FeWrapperSpec | NULL}
    	with: required {BooleanVar}
    	"If there is a SubEdition at a key in an edition, and if a spec is supplied, that it can be certified as the given type"

    	| value {FeRangeElement} |
    	value := parent fetch: key.
    	value == NULL ifTrue: [^required not].
    	^(value isKindOf: FeEdition)
    		and: [spec == NULL
    			or: [spec certify: (value cast: FeEdition)]]!
    */
  }