Difference between revisions of "MemberInfo"

From Xojo Documentation

m (1 revision)
 
(Examples)
 
(22 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
{{ClassBox
 +
| super=[[Object]]
 +
| platform=all
 +
| scope=global
 +
}}
 +
{{Description
 +
|text = '''MemberInfo''' is the super class for the [[AttributeInfo]], [[MethodInfo]], [[PropertyInfo]], and [[TypeInfo]] classes in the [[Introspection]] system. }}
  
 +
<dynamicTable id="Properties" class="propertyTable" title="Properties" columns="3">
 +
{{Property | name=IsPrivate | type=Boolean | readonly=yes | newinversion=2008r3 | description=( Boolean)&nbsp;&nbsp;If True, the item has Private scope. }}
 +
{{Property | name=IsProtected | type=Boolean | readonly=yes | newinversion=2008r3 | description=( Boolean)&nbsp;&nbsp;Is True, the item has Protected scope. }}
 +
{{Property | name=IsPublic | type=Boolean | readonly=yes | newinversion=2008r3 | description=( Boolean)&nbsp;&nbsp;If True, the item has Public scope. }}
 +
{{Property | name=Name | type=String | readonly=yes | description=( String)&nbsp;&nbsp;The name of the item. }}
 +
</dynamicTable>
  
=='''Description'''==
+
<dynamicTable id="Methods" class="methodTable" title="Methods" columns="3">
'''MemberInfo''' is the super class for the [[AttributeInfo|AttributeInfo]], [[MethodInfo|MethodInfo]], [[PropertyInfo|PropertyInfo]], and [[TypeInfo|TypeInfo]] classes in the [[Introspection|Introspection]] system.
+
{{Method | name=GetAttributes | returntype=[[AttributeInfo]]() | description=GetAttributes() As AttributeInfo()&#x0A;Returns an array of AttributeInfo objects. }}
 +
</dynamicTable>
  
 
+
==Examples==
 
 
=='''Super Class'''==
 
[[Object|Object]]
 
 
 
=='''Properties'''==
 
 
 
{| cellpadding="8" cellspacing="0" border="1"
 
 
 
! width=10%  style="background-color:#e0e0e0" | Name
 
 
 
! width=15%  style="background-color:#e0e0e0" | Type
 
 
 
! width=55%  style="background-color:#e0e0e0" | Description
 
|-
 
|IsPrivate
 
<div style="font-style:italic; color:green;">Introduced 2008r3</div>
 
|[[Boolean|Boolean]]
 
|If [[True|True]], the item has Private scope.
 
 
 
|-
 
|IsProtected
 
<div style="font-style:italic; color:green;">Introduced 2008r3</div>
 
|[[Boolean|Boolean]]
 
|Is [[True|True]], the item has Protected scope.
 
 
 
|-
 
|IsPublic
 
<div style="font-style:italic; color:green;">Introduced 2008r3</div>
 
|[[Boolean|Boolean]]
 
|If [[True|True]], the item has Public scope.
 
 
 
|-
 
|Name
 
 
 
|[[String|String]]
 
|The name of the item.
 
 
 
|-
 
|}
 
 
 
 
 
=='''Methods'''==
 
 
 
{| cellpadding="8" cellspacing="0" border="1"
 
 
 
! width=10%  style="background-color:#e0e0e0" | Name
 
 
 
! width=25%  style="background-color:#e0e0e0" | Return Type
 
 
 
! width=55%  style="background-color:#e0e0e0" | Description
 
|-
 
|GetAttributes
 
 
 
|[[AttributeInfo|AttributeInfo]]()
 
 
 
|Returns an array of [[AttributeInfo|AttributeInfo]] objects.
 
 
 
|-
 
|}
 
 
 
 
 
=='''Examples'''==
 
 
The following reports the name of the class instance.
 
The following reports the name of the class instance.
{| cellpadding="8" cellspacing="0" border="1"
 
|<div style="width:100%; background-color:#d0d0d0; padding-left:30px">[[Dim|Dim]] d as [[New|New]] [[Date|Date]]<br /></div>
 
<div style="width:100%; background-color:#d0d0d0; padding-left:30px">[[Dim|Dim]] t as [[Introspection|Introspection]].TypeInfo = [[Introspection|Introspection]].GetType(d)
 
<br /></div>
 
<br />
 
<div style="width:100%; background-color:#d0d0d0; padding-left:30px">[[MsgBox|MsgBox]] "My class name is "+t.Name+"."
 
<br /></div>
 
  
|-
+
<rbcode>
|}
+
Var d As New DateTime.Now
 +
Var t As Introspection.TypeInfo = Introspection.GetType(d)
 +
MessageBox("My class name is " + t.Name + ".")
 +
</rbcode>
  
 
The following gets the attributes of window1.
 
The following gets the attributes of window1.
{| cellpadding="8" cellspacing="0" border="1"
 
|<div style="width:100%; background-color:#d0d0d0; padding-left:30px">[[Dim|Dim]] myAttributes() as [[Introspection|Introspection]].AttributeInfo= [[_|_]]<br /></div>
 
<div style="width:100%; background-color:#d0d0d0; padding-left:30px">[[Introspection|Introspection]].GetType(window1).GetAttributes
 
<br /></div>
 
 
|-
 
|}
 
  
 +
<rbcode>
 +
Var myAttributes() As Introspection.AttributeInfo= _
 +
  Introspection.GetType(Window1).GetAttributes
 +
</rbcode>
  
=='''See Also'''==
+
==See Also==
[[Introspection|Introspection]] module; [[AttributeInfo|AttributeInfo]], [[ConstructorInfo|ConstructorInfo]], [[MethodInfo|MethodInfo]], [[ObjectIterator|ObjectIterator]], [[ParameterInfo|ParameterInfo]], [[PropertyInfo|PropertyInfo]], [[TypeInfo|TypeInfo]] classes; [[GetTypeInfo|GetTypeInfo]] function.
+
[[Introspection]] module; [[AttributeInfo]], [[ConstructorInfo]], [[MethodInfo]], [[ObjectIterator]], [[ParameterInfo]], [[PropertyInfo]], [[TypeInfo]] classes; [[GetTypeInfo]] function.
  
 +
[http://developer.xojo.com/xojo-introspection Xojo.Introspection]
  
[[Category:Classes]]
+
[[Category:Language_Classes]]
[[Category:Introspection]]
+
[[Category:Language_Introspection]]

Latest revision as of 02:16, 23 January 2022

Class (inherits from Object)

MemberInfo is the super class for the AttributeInfo, MethodInfo, PropertyInfo, and TypeInfo classes in the Introspection system.

Properties
IsPrivate fa-lock-32.png IsPublic fa-lock-32.png
IsProtected fa-lock-32.png Name fa-lock-32.png
Methods
GetAttributes

Examples

The following reports the name of the class instance.

Var d As New DateTime.Now
Var t As Introspection.TypeInfo = Introspection.GetType(d)
MessageBox("My class name is " + t.Name + ".")

The following gets the attributes of window1.

Var myAttributes() As Introspection.AttributeInfo= _
Introspection.GetType(Window1).GetAttributes

See Also

Introspection module; AttributeInfo, ConstructorInfo, MethodInfo, ObjectIterator, ParameterInfo, PropertyInfo, TypeInfo classes; GetTypeInfo function.

Xojo.Introspection