1 23 package com.sun.enterprise.security.acl; 24 25 import java.security.Principal ; 26 27 import java.lang.reflect.Method ; 28 29 33 public class EJBResource extends Resource { 34 35 public EJBResource(String app, Method method) { 36 super(app,method.getDeclaringClass().getName(), method.toString()); 37 } 38 39 public boolean equals(Object obj) { 40 if(obj == this) 41 return true; 42 43 if ((obj == null) || (obj.getClass() != getClass())) 44 return false; 45 46 Resource r = (Resource) obj; 47 48 return getApplication().equals(r.getApplication()) && 49 getMethod().equals(r.getMethod()) && 50 getName().equals(r.getName()); 51 } 52 53 public boolean implies(Resource resource) { 54 return equals(resource); 55 } 56 } 57 | Popular Tags |