2 * Constructs a Reflect base class.
\r
3 * @exports ProtoBuf.Reflect.T
\r
6 * @param {!ProtoBuf.Builder} builder Builder reference
\r
7 * @param {?ProtoBuf.Reflect.T} parent Parent object
\r
8 * @param {string} name Object name
\r
10 var T = function(builder, parent, name) {
\r
13 * Builder reference.
\r
14 * @type {!ProtoBuf.Builder}
\r
17 this.builder = builder;
\r
21 * @type {?ProtoBuf.Reflect.T}
\r
24 this.parent = parent;
\r
27 * Object name in namespace.
\r
34 * Fully qualified class name
\r
42 * @alias ProtoBuf.Reflect.T.prototype
\r
45 var TPrototype = T.prototype;
\r
48 * Returns the fully qualified name of this object.
\r
49 * @returns {string} Fully qualified name as of ".PATH.TO.THIS"
\r
52 TPrototype.fqn = function() {
\r
53 var name = this.name,
\r
59 name = ptr.name+"."+name;
\r
65 * Returns a string representation of this Reflect object (its fully qualified name).
\r
66 * @param {boolean=} includeClass Set to true to include the class name. Defaults to false.
\r
67 * @return String representation
\r
70 TPrototype.toString = function(includeClass) {
\r
71 return (includeClass ? this.className + " " : "") + this.fqn();
\r
76 * @throws {Error} If this type cannot be built directly
\r
79 TPrototype.build = function() {
\r
80 throw Error(this.toString(true)+" cannot be built directly");
\r