SourceTec Software

It is currently Wed Apr 23, 2014 5:28 pm

All times are UTC + 8 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Mar 30, 2010 5:09 pm 
Offline
Member

Joined: Tue Mar 30, 2010 4:59 pm
Posts: 1
Hello,
I buy SWF Decompiler for Mac, I have the latest build (5.3 build 520) and I have strange decompiled code.

I have this little class :
Code:
package org.hamcrest.number
{
    import org.hamcrest.Description;
    import org.hamcrest.TypeSafeMatcher;

    public class IsGreaterThanMatcher extends TypeSafeMatcher
    {
        private var _value:Number;

        public function IsGreaterThanMatcher(value:Number)
        {
            super(Number);
            _value = value;
        }

        override public function matchesSafely(item:Object):Boolean
        {
            return Number(item) > _value;
        }

        override public function describeMismatch(item:Object, mismatchDescription:Description):void
        {
            mismatchDescription.appendValue(item)
                .appendText(" was less than ");

            mismatchDescription.appendValue(_value);
        }

        override public function describeTo(description:Description):void
        {
            description.appendText("a value greater than ");
            description.appendValue(_value);
        }
    }
}


I compile it with FDT (MXMLC). And when I want to show it in SWFDecompiler, it show me :

Code:
package org.hamcrest.number
{
    import org.hamcrest.*;

    public class IsGreaterThanMatcher extends TypeSafeMatcher {
        private var _value:Number;

        public function IsGreaterThanMatcher(param1:Number) {
            super(Number);
            _value = param1;
            return;
        }
        override public function describeMismatch(org.hamcrest.number:IsGreaterThanMatcher/IsGreaterThanMatcher:Object, org.hamcrest.number:IsGreaterThanMatcher/IsGreaterThanMatcher:Description) : void {
            org.hamcrest.number:IsGreaterThanMatcher/IsGreaterThanMatcher.appendValue(org.hamcrest.number:IsGreaterThanMatcher/IsGreaterThanMatcher).appendText(" was less than ");
            org.hamcrest.number:IsGreaterThanMatcher/IsGreaterThanMatcher.appendValue(_value);
            return;
        }
        override public function describeTo(org.hamcrest.number:IsGreaterThanMatcher/IsGreaterThanMatcher:Description) : void {
            org.hamcrest.number:IsGreaterThanMatcher/IsGreaterThanMatcher.appendText("a value greater than ");
            org.hamcrest.number:IsGreaterThanMatcher/IsGreaterThanMatcher.appendValue(_value);
            return;
        }
        override public function matchesSafely(/Users/user/workspace/HAMCREST/src;org/hamcrest/number;IsGreaterThanMatcher.as:Object) : Boolean {
            return Number(/Users/user/workspace/HAMCREST/src;org/hamcrest/number;IsGreaterThanMatcher.as) > _value;
        }
    }
}


This code is unworkable. Is there a solution?
Thanks !


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group