Interface PrimordialDomain
- All Known Subinterfaces:
Domain
- All Known Implementing Classes:
DefaultDomain
java.lang.Object type, and the ability to globally lock for symbol completion if
needed.
PrimordialDomains are primordial because they expose the "first principles" constructs needed to compose
other constructs.
- Author:
- Laird Nelson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the (non-null, determinate)DeclaredTyperepresenting the prototypical type ofjava.lang.Object.lock()Semantically locks an opaque lock used to serialize symbol completion, and returns it in the form of anUnlockable.Returns a (non-null, determinate)NoTyperepresenting the suppliedTypeKind, provided it is eitherTypeKind.NONEorTypeKind.VOID.nullType()Returns a (non-null, determinate)NullTyperepresenting the null type.default StringtoString(CharSequence name) A convenience method that converts the suppliedCharSequence, which is often aName, into aString, and returns the conversion, locking when appropriate to serialize symbol completion.
-
Method Details
-
javaLangObjectType
Returns the (non-null, determinate)DeclaredTyperepresenting the prototypical type ofjava.lang.Object.Implementations of this method must not return
null.DeclaredTypeinstances returned by implementations of this method must returnTypeKind.DECLAREDfrom theirTypeMirror.getKind()method.- Returns:
- the
DeclaredTyperepresenting the prototypical type ofjava.lang.Object; nevernull
-
lock
Semantically locks an opaque lock used to serialize symbol completion, and returns it in the form of anUnlockable.Implementations of this method must not return
null.- Returns:
- an
Unlockablein a semantically locked state; nevernull - See Also:
-
noType
Returns a (non-null, determinate)NoTyperepresenting the suppliedTypeKind, provided it is eitherTypeKind.NONEorTypeKind.VOID.Implementations of this method must not return
null.- Parameters:
kind- aTypeKind; must be eitherTypeKind.NONEorTypeKind.VOID- Returns:
- a
NoTyperepresenting the suppliedTypeKind; nevernull - Throws:
NullPointerException- ifkindisnullIllegalArgumentException- ifkindis neitherTypeKind.NONEnorTypeKind.VOID- See Also:
-
nullType
-
toString
A convenience method that converts the suppliedCharSequence, which is often aName, into aString, and returns the conversion, locking when appropriate to serialize symbol completion.The default implementation of this method may return
nullif the suppliednameisnull.In many implementations of domains, converting a
Nameto aStringcan cause problems if symbol completion is taking place concurrently and the symbol completion lock is not held. This method helps avoid those problems.Overriding this method is not normally needed.
- Parameters:
name- theCharSequenceto convert; may benullin which casenullwill be returned- Returns:
- a
String, ornullifnamewasnull - See Also:
-