学ぶ
エンジンクラス
ReflectionService
作成できません
サービス
複製されていません

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。


概要
方法
GetClass(className: string,filter: Dictionary):ReflectedClass?
GetClasses(filter: Dictionary):{ReflectedClass}
GetEventsOfClass(className: string,filter: Dictionary):{ReflectedEvent}
GetMethodsOfClass(className: string,filter: Dictionary):{ReflectedMethod}
GetPropertiesOfClass(className: string,filter: Dictionary):{ReflectedProperty}
継承されたメンバー
コードサンプル
ReflectionService 概要
local ReflectionService = game:GetService("ReflectionService")
-- すべての機能を持つ SecurityCapabilities オブジェクトを作成します
local allCapabilities = SecurityCapabilities.new(table.unpack(Enum.SecurityCapability:GetEnumItems()))
-- すべての機能でアクセス可能なすべてのクラスを取得します
local allClasses = ReflectionService:GetClasses({ Security = allCapabilities })
print("合計クラス数:", #allClasses)
-- 特定のクラスを取得します
local partClass = ReflectionService:GetClass("Part")
if partClass then
print("\nPart クラス:")
print(" 名前:", partClass.Name)
print(" スーパークラス:", partClass.Superclass and tostring(partClass.Superclass) or "なし")
end
-- クラスの最初の 5 つのプロパティを取得します
local properties = ReflectionService:GetPropertiesOfClass("Part", { Security = allCapabilities })
print("\nPart プロパティ:", #properties)
for i = 1, math.min(5, #properties) do
print(" -", properties[i].Name)
end

APIリファレンス
方法
GetClass
ReflectionService:GetClass(
className:string, filter:Dictionary
):ReflectedClass?
パラメータ
className:string
filter:Dictionary
既定値: "nil"
戻り値
ReflectedClass?

GetClasses
ReflectionService:GetClasses(filter:Dictionary):{ReflectedClass}
パラメータ
filter:Dictionary
既定値: "nil"
戻り値
{ReflectedClass}

GetEventsOfClass
ReflectionService:GetEventsOfClass(
className:string, filter:Dictionary
):{ReflectedEvent}
パラメータ
className:string
filter:Dictionary
既定値: "nil"
戻り値
{ReflectedEvent}

GetMethodsOfClass
ReflectionService:GetMethodsOfClass(
className:string, filter:Dictionary
):{ReflectedMethod}
パラメータ
className:string
filter:Dictionary
既定値: "nil"
戻り値
{ReflectedMethod}

GetPropertiesOfClass
ReflectionService:GetPropertiesOfClass(
className:string, filter:Dictionary
):{ReflectedProperty}
パラメータ
className:string
filter:Dictionary
既定値: "nil"
戻り値
{ReflectedProperty}

©2026 Roblox Corporation。Roblox(ロブロックス)、RobloxロゴおよびPowering Imaginationは、米国並びにその他の国における登録商標および非登録商標です。