ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
PropertyChanger
public
abstract
class
PropertyChanger
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.PropertyChanger
|
คลาสยูทิลิตีสำหรับเปลี่ยน (หรือเพิ่ม) รายการในไฟล์พร็อพเพอร์ตี้ Android
สรุป
เมธอดสาธารณะ |
static
File
|
changeProperties(File original, properties)
ฟังก์ชันยูทิลิตีสำหรับเปลี่ยน (หรือเพิ่ม) รายการในไฟล์พร็อพเพอร์ตี้ Android
ระบบจะแก้ไขค่าของพร็อพเพอร์ตี้ที่อยู่ในไฟล์พร็อพเพอร์ตี้ต้นฉบับ
|
ตัวสร้างแบบสาธารณะ
PropertyChanger
public PropertyChanger ()
เมธอดสาธารณะ
changeProperties
public static File changeProperties (File original,
properties)
ฟังก์ชันยูทิลิตีสำหรับเปลี่ยน (หรือเพิ่ม) รายการในไฟล์พร็อพเพอร์ตี้ Android
ระบบจะแก้ไขค่าของพร็อพเพอร์ตี้ที่อยู่ในไฟล์พร็อพเพอร์ตี้ต้นฉบับ ระบบจะเพิ่มรายการใหม่ต่อท้าย ผู้เรียกใช้มีหน้าที่รับผิดชอบในการรีไซเคิลไฟล์ชั่วคราวอย่างเหมาะสม ทั้งไฟล์ต้นฉบับและไฟล์ที่แก้ไขแล้ว
พารามิเตอร์ |
original |
File : ไฟล์พร็อพเพอร์ตี้ต้นฉบับ |
properties |
: พร็อพเพอร์ตี้ที่จะเปลี่ยนหรือเพิ่ม |
คิกรีเทิร์น |
File |
เส้นทางไปยังไฟล์พร็อพเพอร์ตี้ใหม่ |
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],null,["# PropertyChanger\n===============\n\n\n`\npublic\n\n\nabstract\nclass\nPropertyChanger\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|-------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.util.PropertyChanger |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA utility class for changing (or adding) items in an Android property file\n\nSummary\n-------\n\n| ### Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[PropertyChanger](../../../../../../reference/tradefed/com/android/tradefed/util/PropertyChanger.html#PropertyChanger())`() ` |\n\n| ### Public methods ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static File` | ` `[changeProperties](../../../../../../reference/tradefed/com/android/tradefed/util/PropertyChanger.html#changeProperties(File,%20\u003cany\u003e))`(File original, ` properties) A utility function to change (or add) items in an Android property file Properties that are in the original property file will have its value modified. |\n\nPublic constructors\n-------------------\n\n### PropertyChanger\n\n```\npublic PropertyChanger ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### changeProperties\n\n```\npublic static File changeProperties (File original, \n properties)\n```\n\nA utility function to change (or add) items in an Android property file\n\nProperties that are in the original property file will have its value modified. New ones\nwill be appended. Caller is responsible for properly recycling temporary files, both original\nand the modified.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|-------------------------------------------|\n| `original` | `File`: the original property file \u003cbr /\u003e |\n| `properties` | : the properties to change or add \u003cbr /\u003e |\n\n| Returns ||\n|--------|--------------------------------------|\n| `File` | path to the new property file \u003cbr /\u003e |"]]