Docstoc

5 PermissionImpl synopsis

Document Sample
5 PermissionImpl synopsis Powered By Docstoc
					PermissionImpl -- synopsis by Florian Mueller (http://fosspatents.blogspot.com -- Twitter:FOSSpatents)

   Source code generated by decompilation of PermissionImpl.class                       Source code shipped by Google
       (jdk1.5.0.22; spaces and blank lines inserted manually)         (Android "Froyo" release; spaces and blank lines inserted manually)

// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel                   /*
Kouznetsov.                                                           * Licensed to the Apache Software Foundation (ASF)
// Jad home page: http://www.kpdus.com/jad.html                      under one or more
// Decompiler options: packimports(3)                                 * contributor license agreements. See the NOTICE file
// Source File Name:   PermissionImpl.java                           distributed with
                                                                      * this work for additional information regarding
                                                                     copyright ownership.
                                                                      * The ASF licenses this file to You under the Apache
                                                                     License, Version 2.0
                                                                      * (the "License"); you may not use this file except in
                                                                     compliance with
                                                                      * the License. You may obtain a copy of the License at
                                                                      *
                                                                      *     http://www.apache.org/licenses/LICENSE-2.0
                                                                      *
                                                                      * Unless required by applicable law or agreed to in
                                                                     writing, software
                                                                      * distributed under the License is distributed on an
                                                                     "AS IS" BASIS,
                                                                      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
                                                                     express or implied.
                                                                      * See the License for the specific language governing
                                                                     permissions and
                                                                      * limitations under the License.
                                                                      */

package sun.security.acl;                                            package org.apache.harmony.security.tests.support.acl;

import java.security.acl.Permission;                                 import java.security.acl.Permission;

                                                                     /**
                                                                      * Additional class for verification Permission interface
                                                                      */


                                                     PermissionImpl synopsis -- page 1 of 2
public class PermissionImpl                                                              public class PermissionImpl implements Permission {
    implements Permission
{
                                                                                              private String permission;2

      public PermissionImpl(String s)                                                         public PermissionImpl(String s) {
      {
          permission = s;                                                                           permission = s;
      }                                                                                       }

      public boolean equals(Object obj)                                                       public boolean equals(Object obj) {
      {
          if(obj instanceof Permission)                                                             if(obj instanceof Permission) {
          {
              Permission permission1 = (Permission)obj;                                                 Permission permission1 = (Permission)obj;
              return permission.equals(                                                                 return permission.equals(
              permission1.toString());                                                                  permission1.toString());
          } else                                                                                    } else {
          {
              return false;                                                                             return false;
          }                                                                                         }
      }                                                                                       }

      public String toString()                                                                public String toString() {
      {
          return permission;                                                                        return permission;
      }                                                                                       }

      public int hashCode()                                                              /*       public int hashCode() {
      {
          return toString().hashCode();                                                             return toString().hashCode();
      }1                                                                                      }*/

      private String permission;
}                                                                                        }



1 In the right column, this small segment (a function) is outcommented.
2 In the left column, the same declaration appears at the end of the class definition.

                                                                    PermissionImpl synopsis -- page 2 of 2

				
DOCUMENT INFO
Shared By:
Stats:
views:1271
posted:1/21/2011
language:English
pages:2