25 readonly ReadOnlyMemory<char>
value;
32 this(
value.AsMemory())
35 throw new ArgumentNullException(nameof(
value));
65 public bool IsNestedClass =>
value.Span.LastIndexOf(
'$') is
int i && i != -1 && i + 1 < value.Length &&
char.IsNumber(
value.Span[i + 1]) ==
false;
70 public bool IsAnonymousClass =>
value.Span.LastIndexOf(
'$') is
int i && i != -1 && i + 1 < value.Length &&
value.Slice(i + 1).Span.OnlyNumbers();
75 public bool IsLocalClass =>
value.Span.LastIndexOf(
'$') is
int i && i != -1 && i + 2 < value.Length &&
char.IsNumber(
value.Span[i + 1]) &&
value.Slice(i + 1).Span.OnlyNumbers() ==
false;
89 public override bool Equals(
object obj) =>
false;
Provides methods to parse a Java class name without package.
bool IsAnonymousClass
Returns true if this name represents an anonymous class.
override string ToString()
Returns a string instance of the type name.
static JavaUnqualifiedTypeName Empty
bool IsInnerClass
Returns true if this name represents an inner class of another class.
readonly ReadOnlyMemory< char > value
bool IsEmpty
Returns true if this type name is empty.
static bool operator!=(JavaUnqualifiedTypeName a, JavaUnqualifiedTypeName b)
bool Equals(JavaUnqualifiedTypeName other)
Returns true if the two objects are equal.
bool IsLocalClass
Returns true if this name represents a local class.
ReadOnlyMemory< char > Value
Gets the underlying value of the type name.
static bool operator==(JavaUnqualifiedTypeName a, JavaUnqualifiedTypeName b)
JavaUnqualifiedTypeName(string value)
Initializes a new instance.
JavaUnqualifiedTypeName(ReadOnlyMemory< char > value)
Initializes a new instance.
bool IsNestedClass
Returns true if this name represents a nested class.
override bool Equals(object obj)
Returns true if the two objects are equal.
override int GetHashCode()
Gets the hash code of this type name.