Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1004403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:07:43+00:00 2026-05-16T08:07:43+00:00

Ok, so I swear this question should be all over the place, but its

  • 0

Ok, so I swear this question should be all over the place, but its not.

I have a value object, inside are lots of getters/setters. It is not a dynamic class. And I desperately need to search an ArrayCollection filled with them. The search spans all fields, so and there are about 13 different types of VOs I’ll be doing this with.

I’ve tried ObjectUtil.toString() and that works fine and all but it’s slow as hell. There are 20 properties to return and ObjectUtil.toString() adds a bunch of junk to the output, not to mention the code is slow to begin with.

flash.utils.describeType() is even worse.

I’ll be pleased to hear I’m missing something obvious.

UPDATE:
I ended up taking Juan’s code along with the filter algorithm I use for searching and created ArrayCollectionX. Which means that every ArrayCollection I use now handles it’s own filters. I can search through individual properties of the items in the AC, or with Juan’s code it handles full collection search like a champ. There was negligible lag compared to the same solution with external filters.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:07:44+00:00Added an answer on May 16, 2026 at 8:07 am

    If I understand your problem correctly, what you want is a list of the getters defined for certain objects. As far as I know, you’ll have to use describeType for something like this (I’m pretty sure ObjectUtils uses this method under the hood).

    Calling describeType a lot is going to be slow, as you note. But for only 13 types, this shouldn’t be problematic, I think. Since these types are not dynamic, you know their properties are fixed, so you can retrieve this data once and cache it. You can build your cache up front or as you find new types.

    Here’s is a simple way to do this in code:

    private var typePropertiesCache:Object = {};
    
    private function getPropertyNames(instance:Object):Array {
        var className:String = getQualifiedClassName(instance);
        if(typePropertiesCache[className]) {
            return typePropertiesCache[className];
        }
        var typeDef:XML = describeType(instance);
        var props:Array = [];
        for each(var prop:XML in typeDef.accessor.(@access == "readwrite" || @access == "readonly")) {
            props.push(prop.@name);
        }   
        return typePropertiesCache[className] = props;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I swear I have poured and poured over every other similar question on this
I swear this used to work, but it's not in this case. I'm trying
I swear... i hope this is the last question I have to ask like
This question should be rather easy for any Java developer. I swear I looked
I swear this script worked fine last night but can't get it to work
I swear, I have this exact thing working on another page. I'm such a
I may be completely off on this, but I swear I remember reading somewhere
This might be a stupid question, but is there a rule that states that
Apologies if this is a really common and/or ridiculous question; I swear I've read
I searched existing tutorials related this question, And i followed that example. But still

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.