~ubuntu-branches/ubuntu/trusty/cglib/trusty

« back to all changes in this revision

Viewing changes to src/proxy/net/sf/cglib/core/ClassInfo.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2009-10-08 21:23:45 UTC
  • Revision ID: james.westby@ubuntu.com-20091008212345-t2zy5hv2g8o4i40k
Tags: upstream-2.2+dfsg
ImportĀ upstreamĀ versionĀ 2.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2004 The Apache Software Foundation
 
3
 *
 
4
 *  Licensed under the Apache License, Version 2.0 (the "License");
 
5
 * you may not use this file except in compliance with the License.
 
6
 * You may obtain a copy of the License at
 
7
 *
 
8
 *      http://www.apache.org/licenses/LICENSE-2.0
 
9
 *
 
10
 *  Unless required by applicable law or agreed to in writing, software
 
11
 * distributed under the License is distributed on an "AS IS" BASIS,
 
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
13
 * See the License for the specific language governing permissions and
 
14
 * limitations under the License.
 
15
 */
 
16
package net.sf.cglib.core;
 
17
 
 
18
import org.objectweb.asm.Attribute;
 
19
import org.objectweb.asm.Type;
 
20
 
 
21
abstract public class ClassInfo {
 
22
 
 
23
    protected ClassInfo() {
 
24
    }
 
25
 
 
26
    abstract public Type getType();
 
27
    abstract public Type getSuperType();
 
28
    abstract public Type[] getInterfaces();
 
29
    abstract public int getModifiers();
 
30
 
 
31
    public boolean equals(Object o) {
 
32
        if (o == null)
 
33
            return false;
 
34
        if (!(o instanceof ClassInfo))
 
35
            return false;
 
36
        return getType().equals(((ClassInfo)o).getType());
 
37
    }
 
38
 
 
39
    public int hashCode() {
 
40
        return getType().hashCode();
 
41
    }
 
42
 
 
43
    public String toString() {
 
44
        // TODO: include modifiers, superType, interfaces
 
45
        return getType().getClassName();
 
46
    }
 
47
}