001// license-header java merge-point
002//
003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
004//
005package org.andromda.cartridges.meta.metafacades;
006
007import java.util.Collection;
008import org.andromda.core.common.Introspector;
009import org.andromda.core.metafacade.MetafacadeBase;
010import org.andromda.core.metafacade.MetafacadeFactory;
011import org.andromda.core.metafacade.ModelValidationMessage;
012import org.andromda.metafacades.uml.ConstraintFacade;
013import org.andromda.metafacades.uml.DependencyFacade;
014import org.andromda.metafacades.uml.GeneralizableElementFacade;
015import org.andromda.metafacades.uml.GeneralizationFacade;
016import org.andromda.metafacades.uml.ModelElementFacade;
017import org.andromda.metafacades.uml.ModelFacade;
018import org.andromda.metafacades.uml.PackageFacade;
019import org.andromda.metafacades.uml.StateMachineFacade;
020import org.andromda.metafacades.uml.StereotypeFacade;
021import org.andromda.metafacades.uml.TaggedValueFacade;
022import org.andromda.metafacades.uml.TemplateParameterFacade;
023import org.andromda.metafacades.uml.TypeMappings;
024
025/**
026 * Represents a generalization between two metafacades.
027 * MetafacadeLogic for MetafacadeGeneralization
028 *
029 * @see MetafacadeGeneralization
030 */
031public abstract class MetafacadeGeneralizationLogic
032    extends MetafacadeBase
033    implements MetafacadeGeneralization
034{
035    /**
036     * The underlying UML object
037     * @see Object
038     */
039    protected Object metaObject;
040
041    /** Create Metafacade implementation instance using the MetafacadeFactory from the context
042     * @param metaObjectIn
043     * @param context
044     */
045    protected MetafacadeGeneralizationLogic(Object metaObjectIn, String context)
046    {
047        super(metaObjectIn, getContext(context));
048        this.superGeneralizationFacade =
049           (GeneralizationFacade)
050            MetafacadeFactory.getInstance().createFacadeImpl(
051                    "org.andromda.metafacades.uml.GeneralizationFacade",
052                    metaObjectIn,
053                    getContext(context));
054        this.metaObject = metaObjectIn;
055    }
056
057    /**
058     * Gets the context for this metafacade logic instance.
059     * @param context String. Set to MetafacadeGeneralization if null
060     * @return context String
061     */
062    private static String getContext(String context)
063    {
064        if (context == null)
065        {
066            context = "org.andromda.cartridges.meta.metafacades.MetafacadeGeneralization";
067        }
068        return context;
069    }
070
071    private GeneralizationFacade superGeneralizationFacade;
072    private boolean superGeneralizationFacadeInitialized = false;
073
074    /**
075     * Gets the GeneralizationFacade parent instance.
076     * @return this.superGeneralizationFacade GeneralizationFacade
077     */
078    private GeneralizationFacade getSuperGeneralizationFacade()
079    {
080        if (!this.superGeneralizationFacadeInitialized)
081        {
082            ((MetafacadeBase)this.superGeneralizationFacade).setMetafacadeContext(this.getMetafacadeContext());
083            this.superGeneralizationFacadeInitialized = true;
084        }
085        return this.superGeneralizationFacade;
086    }
087
088    /** Reset context only for non-root metafacades
089     * @param context
090     * @see org.andromda.core.metafacade.MetafacadeBase#resetMetafacadeContext(String context)
091     */
092    @Override
093    public void resetMetafacadeContext(String context)
094    {
095        if (!this.contextRoot) // reset context only for non-root metafacades
096        {
097            context = getContext(context);  // to have same value as in original constructor call
098            setMetafacadeContext (context);
099            if (this.superGeneralizationFacadeInitialized)
100            {
101                ((MetafacadeBase)this.superGeneralizationFacade).resetMetafacadeContext(context);
102            }
103        }
104    }
105
106    /**
107     * @return boolean true always
108     * @see MetafacadeGeneralization
109     */
110    public boolean isMetafacadeGeneralizationMetaType()
111    {
112        return true;
113    }
114
115    // --------------- attributes ---------------------
116
117   /**
118    * @see org.andromda.cartridges.meta.metafacades.MetafacadeGeneralization#getPrecedence()
119    * @return Integer
120    */
121    protected abstract Integer handleGetPrecedence();
122
123    private Integer __precedence1a;
124    private boolean __precedence1aSet = false;
125
126    /**
127     * Stores the precedence of this generalization (this only matters when multiple inheritance is
128     * taken into account).
129     * @return (Integer)handleGetPrecedence()
130     */
131    public final Integer getPrecedence()
132    {
133        Integer precedence1a = this.__precedence1a;
134        if (!this.__precedence1aSet)
135        {
136            // precedence has no pre constraints
137            precedence1a = handleGetPrecedence();
138            // precedence has no post constraints
139            this.__precedence1a = precedence1a;
140            if (isMetafacadePropertyCachingEnabled())
141            {
142                this.__precedence1aSet = true;
143            }
144        }
145        return precedence1a;
146    }
147
148   /**
149    * @see org.andromda.cartridges.meta.metafacades.MetafacadeGeneralization#getGetterName()
150    * @return String
151    */
152    protected abstract String handleGetGetterName();
153
154    private String __getterName2a;
155    private boolean __getterName2aSet = false;
156
157    /**
158     * The getter name to retrieve this generalization.
159     * @return (String)handleGetGetterName()
160     */
161    public final String getGetterName()
162    {
163        String getterName2a = this.__getterName2a;
164        if (!this.__getterName2aSet)
165        {
166            // getterName has no pre constraints
167            getterName2a = handleGetGetterName();
168            // getterName has no post constraints
169            this.__getterName2a = getterName2a;
170            if (isMetafacadePropertyCachingEnabled())
171            {
172                this.__getterName2aSet = true;
173            }
174        }
175        return getterName2a;
176    }
177
178   /**
179    * @see org.andromda.cartridges.meta.metafacades.MetafacadeGeneralization#getGetterNameVisibility()
180    * @return String
181    */
182    protected abstract String handleGetGetterNameVisibility();
183
184    private String __getterNameVisibility3a;
185    private boolean __getterNameVisibility3aSet = false;
186
187    /**
188     * The visibility of the getter name for accessing this generalization.
189     * @return (String)handleGetGetterNameVisibility()
190     */
191    public final String getGetterNameVisibility()
192    {
193        String getterNameVisibility3a = this.__getterNameVisibility3a;
194        if (!this.__getterNameVisibility3aSet)
195        {
196            // getterNameVisibility has no pre constraints
197            getterNameVisibility3a = handleGetGetterNameVisibility();
198            // getterNameVisibility has no post constraints
199            this.__getterNameVisibility3a = getterNameVisibility3a;
200            if (isMetafacadePropertyCachingEnabled())
201            {
202                this.__getterNameVisibility3aSet = true;
203            }
204        }
205        return getterNameVisibility3a;
206    }
207
208    /**
209     * @return true
210     * @see GeneralizationFacade
211     */
212    public boolean isGeneralizationFacadeMetaType()
213    {
214        return true;
215    }
216
217    /**
218     * @return true
219     * @see ModelElementFacade
220     */
221    public boolean isModelElementFacadeMetaType()
222    {
223        return true;
224    }
225
226    // ----------- delegates to GeneralizationFacade ------------
227    /**
228     * The model element that represents an element that can be generalized or specialized.
229     * @see GeneralizationFacade#getChild()
230     */
231    public GeneralizableElementFacade getChild()
232    {
233        return this.getSuperGeneralizationFacade().getChild();
234    }
235
236    /**
237     * The model element that represents an element that can be generalized or specialized.
238     * @see GeneralizationFacade#getParent()
239     */
240    public GeneralizableElementFacade getParent()
241    {
242        return this.getSuperGeneralizationFacade().getParent();
243    }
244
245    /**
246     * Copies all tagged values from the given ModelElementFacade to this model element facade.
247     * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
248     */
249    public void copyTaggedValues(ModelElementFacade element)
250    {
251        this.getSuperGeneralizationFacade().copyTaggedValues(element);
252    }
253
254    /**
255     * Finds the tagged value with the specified 'tagName'. In case there are more values the first
256     * one found will be returned.
257     * @see ModelElementFacade#findTaggedValue(String tagName)
258     */
259    public Object findTaggedValue(String tagName)
260    {
261        return this.getSuperGeneralizationFacade().findTaggedValue(tagName);
262    }
263
264    /**
265     * Returns all the values for the tagged value with the specified name. The returned collection
266     * will contains only String instances, or will be empty. Never null.
267     * @see ModelElementFacade#findTaggedValues(String tagName)
268     */
269    public Collection<Object> findTaggedValues(String tagName)
270    {
271        return this.getSuperGeneralizationFacade().findTaggedValues(tagName);
272    }
273
274    /**
275     * Returns the fully qualified name of the model element. The fully qualified name includes
276     * complete package qualified name of the underlying model element. The templates parameter will
277     * be replaced by the correct one given the binding relation of the parameter to this element.
278     * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
279     */
280    public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
281    {
282        return this.getSuperGeneralizationFacade().getBindedFullyQualifiedName(bindedElement);
283    }
284
285    /**
286     * Gets all constraints belonging to the model element.
287     * @see ModelElementFacade#getConstraints()
288     */
289    public Collection<ConstraintFacade> getConstraints()
290    {
291        return this.getSuperGeneralizationFacade().getConstraints();
292    }
293
294    /**
295     * Returns the constraints of the argument kind that have been placed onto this model. Typical
296     * kinds are "inv", "pre" and "post". Other kinds are possible.
297     * @see ModelElementFacade#getConstraints(String kind)
298     */
299    public Collection<ConstraintFacade> getConstraints(String kind)
300    {
301        return this.getSuperGeneralizationFacade().getConstraints(kind);
302    }
303
304    /**
305     * Gets the documentation for the model element, The indent argument is prefixed to each line.
306     * By default this method wraps lines after 64 characters.
307     * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
308     * @see ModelElementFacade#getDocumentation(String indent)
309     */
310    public String getDocumentation(String indent)
311    {
312        return this.getSuperGeneralizationFacade().getDocumentation(indent);
313    }
314
315    /**
316     * This method returns the documentation for this model element, with the lines wrapped after
317     * the specified number of characters, values of less than 1 will indicate no line wrapping is
318     * required. By default paragraphs are returned as HTML.
319     * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
320     * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
321     */
322    public String getDocumentation(String indent, int lineLength)
323    {
324        return this.getSuperGeneralizationFacade().getDocumentation(indent, lineLength);
325    }
326
327    /**
328     * This method returns the documentation for this model element, with the lines wrapped after
329     * the specified number of characters, values of less than 1 will indicate no line wrapping is
330     * required. HTML style determines if HTML Escaping is applied.
331     * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
332     */
333    public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
334    {
335        return this.getSuperGeneralizationFacade().getDocumentation(indent, lineLength, htmlStyle);
336    }
337
338    /**
339     * The fully qualified name of this model element.
340     * @see ModelElementFacade#getFullyQualifiedName()
341     */
342    public String getFullyQualifiedName()
343    {
344        return this.getSuperGeneralizationFacade().getFullyQualifiedName();
345    }
346
347    /**
348     * Returns the fully qualified name of the model element. The fully qualified name includes
349     * complete package qualified name of the underlying model element.  If modelName is true, then
350     * the original name of the model element (the name contained within the model) will be the name
351     * returned, otherwise a name from a language mapping will be returned.
352     * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
353     */
354    public String getFullyQualifiedName(boolean modelName)
355    {
356        return this.getSuperGeneralizationFacade().getFullyQualifiedName(modelName);
357    }
358
359    /**
360     * Returns the fully qualified name as a path, the returned value always starts with out a slash
361     * '/'.
362     * @see ModelElementFacade#getFullyQualifiedNamePath()
363     */
364    public String getFullyQualifiedNamePath()
365    {
366        return this.getSuperGeneralizationFacade().getFullyQualifiedNamePath();
367    }
368
369    /**
370     * Gets the unique identifier of the underlying model element.
371     * @see ModelElementFacade#getId()
372     */
373    public String getId()
374    {
375        return this.getSuperGeneralizationFacade().getId();
376    }
377
378    /**
379     * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
380     * are not represented by other properties, i.e. native, transient, volatile, synchronized,
381     * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
382     * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
383     * JDK5 compiler level.
384     * @see ModelElementFacade#getKeywords()
385     */
386    public Collection<String> getKeywords()
387    {
388        return this.getSuperGeneralizationFacade().getKeywords();
389    }
390
391    /**
392     * UML2: Retrieves a localized label for this named element.
393     * @see ModelElementFacade#getLabel()
394     */
395    public String getLabel()
396    {
397        return this.getSuperGeneralizationFacade().getLabel();
398    }
399
400    /**
401     * The language mappings that have been set for this model element.
402     * @see ModelElementFacade#getLanguageMappings()
403     */
404    public TypeMappings getLanguageMappings()
405    {
406        return this.getSuperGeneralizationFacade().getLanguageMappings();
407    }
408
409    /**
410     * Return the model containing this model element (multiple models may be loaded and processed
411     * at the same time).
412     * @see ModelElementFacade#getModel()
413     */
414    public ModelFacade getModel()
415    {
416        return this.getSuperGeneralizationFacade().getModel();
417    }
418
419    /**
420     * The name of the model element.
421     * @see ModelElementFacade#getName()
422     */
423    public String getName()
424    {
425        return this.getSuperGeneralizationFacade().getName();
426    }
427
428    /**
429     * Gets the package to which this model element belongs.
430     * @see ModelElementFacade#getPackage()
431     */
432    public ModelElementFacade getPackage()
433    {
434        return this.getSuperGeneralizationFacade().getPackage();
435    }
436
437    /**
438     * The name of this model element's package.
439     * @see ModelElementFacade#getPackageName()
440     */
441    public String getPackageName()
442    {
443        return this.getSuperGeneralizationFacade().getPackageName();
444    }
445
446    /**
447     * Gets the package name (optionally providing the ability to retrieve the model name and not
448     * the mapped name).
449     * @see ModelElementFacade#getPackageName(boolean modelName)
450     */
451    public String getPackageName(boolean modelName)
452    {
453        return this.getSuperGeneralizationFacade().getPackageName(modelName);
454    }
455
456    /**
457     * Returns the package as a path, the returned value always starts with out a slash '/'.
458     * @see ModelElementFacade#getPackagePath()
459     */
460    public String getPackagePath()
461    {
462        return this.getSuperGeneralizationFacade().getPackagePath();
463    }
464
465    /**
466     * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
467     * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
468     * the names of the containing namespaces starting at the root of the hierarchy and ending with
469     * the name of the NamedElement itself.
470     * @see ModelElementFacade#getQualifiedName()
471     */
472    public String getQualifiedName()
473    {
474        return this.getSuperGeneralizationFacade().getQualifiedName();
475    }
476
477    /**
478     * Gets the root package for the model element.
479     * @see ModelElementFacade#getRootPackage()
480     */
481    public PackageFacade getRootPackage()
482    {
483        return this.getSuperGeneralizationFacade().getRootPackage();
484    }
485
486    /**
487     * Gets the dependencies for which this model element is the source.
488     * @see ModelElementFacade#getSourceDependencies()
489     */
490    public Collection<DependencyFacade> getSourceDependencies()
491    {
492        return this.getSuperGeneralizationFacade().getSourceDependencies();
493    }
494
495    /**
496     * If this model element is the context of an activity graph, this represents that activity
497     * graph.
498     * @see ModelElementFacade#getStateMachineContext()
499     */
500    public StateMachineFacade getStateMachineContext()
501    {
502        return this.getSuperGeneralizationFacade().getStateMachineContext();
503    }
504
505    /**
506     * The collection of ALL stereotype names for this model element.
507     * @see ModelElementFacade#getStereotypeNames()
508     */
509    public Collection<String> getStereotypeNames()
510    {
511        return this.getSuperGeneralizationFacade().getStereotypeNames();
512    }
513
514    /**
515     * Gets all stereotypes for this model element.
516     * @see ModelElementFacade#getStereotypes()
517     */
518    public Collection<StereotypeFacade> getStereotypes()
519    {
520        return this.getSuperGeneralizationFacade().getStereotypes();
521    }
522
523    /**
524     * Return the TaggedValues associated with this model element, under all stereotypes.
525     * @see ModelElementFacade#getTaggedValues()
526     */
527    public Collection<TaggedValueFacade> getTaggedValues()
528    {
529        return this.getSuperGeneralizationFacade().getTaggedValues();
530    }
531
532    /**
533     * Gets the dependencies for which this model element is the target.
534     * @see ModelElementFacade#getTargetDependencies()
535     */
536    public Collection<DependencyFacade> getTargetDependencies()
537    {
538        return this.getSuperGeneralizationFacade().getTargetDependencies();
539    }
540
541    /**
542     * Get the template parameter for this model element having the parameterName
543     * @see ModelElementFacade#getTemplateParameter(String parameterName)
544     */
545    public Object getTemplateParameter(String parameterName)
546    {
547        return this.getSuperGeneralizationFacade().getTemplateParameter(parameterName);
548    }
549
550    /**
551     * Get the template parameters for this model element
552     * @see ModelElementFacade#getTemplateParameters()
553     */
554    public Collection<TemplateParameterFacade> getTemplateParameters()
555    {
556        return this.getSuperGeneralizationFacade().getTemplateParameters();
557    }
558
559    /**
560     * The visibility (i.e. public, private, protected or package) of the model element, will
561     * attempt a lookup for these values in the language mappings (if any).
562     * @see ModelElementFacade#getVisibility()
563     */
564    public String getVisibility()
565    {
566        return this.getSuperGeneralizationFacade().getVisibility();
567    }
568
569    /**
570     * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
571     * is taken into account when searching for the stereotype), false otherwise.
572     * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
573     */
574    public boolean hasExactStereotype(String stereotypeName)
575    {
576        return this.getSuperGeneralizationFacade().hasExactStereotype(stereotypeName);
577    }
578
579    /**
580     * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
581     * pipe, semicolon, or << >>
582     * @see ModelElementFacade#hasKeyword(String keywordName)
583     */
584    public boolean hasKeyword(String keywordName)
585    {
586        return this.getSuperGeneralizationFacade().hasKeyword(keywordName);
587    }
588
589    /**
590     * Returns true if the model element has the specified stereotype.  If the stereotype itself
591     * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
592     * one of the stereotype's ancestors has a matching name this method will return true, false
593     * otherwise.
594     * For example, if we have a certain stereotype called <<exception>> and a model element has a
595     * stereotype called <<applicationException>> which extends <<exception>>, when calling this
596     * method with 'stereotypeName' defined as 'exception' the method would return true since
597     * <<applicationException>> inherits from <<exception>>.  If you want to check if the model
598     * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
599     * @see ModelElementFacade#hasStereotype(String stereotypeName)
600     */
601    public boolean hasStereotype(String stereotypeName)
602    {
603        return this.getSuperGeneralizationFacade().hasStereotype(stereotypeName);
604    }
605
606    /**
607     * True if there are target dependencies from this element that are instances of BindingFacade.
608     * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
609     * @see ModelElementFacade#isBindingDependenciesPresent()
610     */
611    public boolean isBindingDependenciesPresent()
612    {
613        return this.getSuperGeneralizationFacade().isBindingDependenciesPresent();
614    }
615
616    /**
617     * Indicates if any constraints are present on this model element.
618     * @see ModelElementFacade#isConstraintsPresent()
619     */
620    public boolean isConstraintsPresent()
621    {
622        return this.getSuperGeneralizationFacade().isConstraintsPresent();
623    }
624
625    /**
626     * Indicates if any documentation is present on this model element.
627     * @see ModelElementFacade#isDocumentationPresent()
628     */
629    public boolean isDocumentationPresent()
630    {
631        return this.getSuperGeneralizationFacade().isDocumentationPresent();
632    }
633
634    /**
635     * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
636     * @see ModelElementFacade#isReservedWord()
637     */
638    public boolean isReservedWord()
639    {
640        return this.getSuperGeneralizationFacade().isReservedWord();
641    }
642
643    /**
644     * True is there are template parameters on this model element. For UML2, applies to Class,
645     * Operation, Property, and Parameter.
646     * @see ModelElementFacade#isTemplateParametersPresent()
647     */
648    public boolean isTemplateParametersPresent()
649    {
650        return this.getSuperGeneralizationFacade().isTemplateParametersPresent();
651    }
652
653    /**
654     * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
655     * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
656     * Enumerations and Interfaces, optionally applies on other model elements.
657     * @see ModelElementFacade#isValidIdentifierName()
658     */
659    public boolean isValidIdentifierName()
660    {
661        return this.getSuperGeneralizationFacade().isValidIdentifierName();
662    }
663
664    /**
665     * Searches for the constraint with the specified 'name' on this model element, and if found
666     * translates it using the specified 'translation' from a translation library discovered by the
667     * framework.
668     * @see ModelElementFacade#translateConstraint(String name, String translation)
669     */
670    public String translateConstraint(String name, String translation)
671    {
672        return this.getSuperGeneralizationFacade().translateConstraint(name, translation);
673    }
674
675    /**
676     * Translates all constraints belonging to this model element with the given 'translation'.
677     * @see ModelElementFacade#translateConstraints(String translation)
678     */
679    public String[] translateConstraints(String translation)
680    {
681        return this.getSuperGeneralizationFacade().translateConstraints(translation);
682    }
683
684    /**
685     * Translates the constraints of the specified 'kind' belonging to this model element.
686     * @see ModelElementFacade#translateConstraints(String kind, String translation)
687     */
688    public String[] translateConstraints(String kind, String translation)
689    {
690        return this.getSuperGeneralizationFacade().translateConstraints(kind, translation);
691    }
692
693    /**
694     * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
695     */
696    @Override
697    public void initialize()
698    {
699        this.getSuperGeneralizationFacade().initialize();
700    }
701
702    /**
703     * @return Object getSuperGeneralizationFacade().getValidationOwner()
704     * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
705     */
706    @Override
707    public Object getValidationOwner()
708    {
709        Object owner = this.getSuperGeneralizationFacade().getValidationOwner();
710        return owner;
711    }
712
713    /**
714     * @return String getSuperGeneralizationFacade().getValidationName()
715     * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
716     */
717    @Override
718    public String getValidationName()
719    {
720        String name = this.getSuperGeneralizationFacade().getValidationName();
721        return name;
722    }
723
724    /**
725     * @param validationMessages Collection<ModelValidationMessage>
726     * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(Collection validationMessages)
727     */
728    @Override
729    public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
730    {
731        this.getSuperGeneralizationFacade().validateInvariants(validationMessages);
732    }
733
734    /**
735     * The property that stores the name of the metafacade.
736     */
737    private static final String NAME_PROPERTY = "name";
738    private static final String FQNAME_PROPERTY = "fullyQualifiedName";
739
740    /**
741     * @see Object#toString()
742     */
743    @Override
744    public String toString()
745    {
746        final StringBuilder toString = new StringBuilder(this.getClass().getName());
747        toString.append("[");
748        try
749        {
750            toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
751        }
752        catch (final Throwable tryAgain)
753        {
754            try
755            {
756                toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
757            }
758            catch (final Throwable ignore)
759            {
760                // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
761            }
762        }
763        toString.append("]");
764        return toString.toString();
765    }
766}