SLDocMember.sleela
lib/sleeladoc/SLDocMember.sleela · 87 line(s) · sleela
<< lib/sleeladoc/SLDocMember.sleela
SLeeLa Standard Library Definition.
Definition: Defines SLDocMember -- a documented declaration (class, field, or
method) with its signature line and the SleelaDoc comment attached to it. >>
#sleela 3.0
material;
< Family: sleeladoc. One documented declaration lifted from a unit: its kind >
< (class / field / method), its name, the raw signature line as written, and the >
< SLDocComment that immediately preceded it (null when undocumented). >
< >
< Kind codes: 0 class, 1 field, 2 method. >
class SLDocMember {
< ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
<< Eleven catalogued attributes with getter/setter pairs, so a GUI, loader,
or catalog can read and (where appropriate) override this record.
Values are faithful to the subject's real origin where publicly known. >>
String metaVersion = "1.0.0";
int metaId = 7943;
String metaAuthor = "Kiro Agent";
String metaDate = "2026-10-28";
String metaCopyright = "SLeeLa project";
String metaTrademark = "none";
String metaCorporation = "none";
< metaOrigin: National | <nation> | International | Galactic >
String metaOrigin = "International";
String metaBirthDate = "2026-10-28";
< metaScienceRating: maturity/robustness on a 1..10 scale >
int metaScienceRating = 9;
< metaNationalSchedule: a real, citable instrument or "none" >
String metaNationalSchedule = "none";
String getMetaVersion() { return metaVersion; }
void setMetaVersion(String v) { metaVersion = v; }
int getMetaId() { return metaId; }
void setMetaId(int v) { metaId = v; }
String getAuthor() { return metaAuthor; }
void setAuthor(String v) { metaAuthor = v; }
String getDate() { return metaDate; }
void setDate(String v) { metaDate = v; }
String getCopyright() { return metaCopyright; }
void setCopyright(String v) { metaCopyright = v; }
String getTrademark() { return metaTrademark; }
void setTrademark(String v) { metaTrademark = v; }
String getCorporation() { return metaCorporation; }
void setCorporation(String v) { metaCorporation = v; }
String getOrigin() { return metaOrigin; }
void setOrigin(String v) { metaOrigin = v; }
String getBirthDate() { return metaBirthDate; }
void setBirthDate(String v) { metaBirthDate = v; }
int getScienceRating() { return metaScienceRating; }
void setScienceRating(int v) { metaScienceRating = v; }
String getNationalSchedule() { return metaNationalSchedule; }
void setNationalSchedule(String v) { metaNationalSchedule = v; }
< ---- the member kinds ---- >
static final int CLASS = 0;
static final int FIELD = 1;
static final int METHOD = 2;
< nodeType of this member (one of the kind codes above). >
int kind;
< The member name (class name, field name, or method name). >
String memberName;
< The raw signature line as written in source. >
String signature;
< The attached SleelaDoc comment, or null when undocumented. >
SLDocComment doc;
void set(int k, String n, String sig) {
kind = k; memberName = n; signature = sig;
}
void attach(SLDocComment c) { doc = c; }
int getKind() { return kind; }
String getName() { return memberName; }
String getSignature() { return signature; }
SLDocComment getDoc() { return doc; }
boolean documented() { return doc != null && !doc.empty(); }
String kindName() {
if (kind == 0) { return "class"; }
if (kind == 1) { return "field"; }
if (kind == 2) { return "method"; }
return "member";
}
}