FileDocCategorySizeDatePackage
FaultLocation.javaAPI DocGlassfish v2 API4720Fri May 04 22:33:24 BST 2007com.sun.enterprise.tools.verifier

FaultLocation

public class FaultLocation extends Object
This class represents the fault location of the failed verifier assertions. It can be used by IDE's to open the faulty source file in the editor. The location object is initialized as part of Result initialization and so it is available in every assertion. Just like every assertion has to populate the result object, it will have to populate this location. For now, few assertions in package 'tests.ejb.ejb30' are modified to provide the location information.
author
Vikas Awasthi

Fields Summary
private Class
faultyClass
private Method
faultyMethod
private Field
faultyField
private String
faultyClassName
private String
faultyMethodName
private String[]
faultyMethodParams
Constructors Summary
Methods Summary
public java.lang.ClassgetFaultyClass()

        return faultyClass;
    
public java.lang.StringgetFaultyClassName()

        if(faultyClassName==null && faultyClass != null)
            faultyClassName = faultyClass.getName();
        return faultyClassName;
    
public java.lang.reflect.FieldgetFaultyField()

        return faultyField;
    
public java.lang.reflect.MethodgetFaultyMethod()

        return faultyMethod;
    
public java.lang.StringgetFaultyMethodName()

        if(faultyMethodName==null && faultyMethod != null)
            faultyMethodName = faultyMethod.getName();
        return faultyMethodName;
    
public java.lang.String[]getFaultyMethodParams()

        if(faultyMethodParams==null && faultyMethod != null) {
            ArrayList<String> l = new ArrayList<String>();
            for (Class<?> aClass : faultyMethod.getParameterTypes()) 
                l.add(aClass.getName());
            faultyMethodParams = l.toArray(new String[]{});
        }
        return faultyMethodParams;
    
public voidsetFaultyClass(java.lang.Class faultyClass)

        this.faultyClass = faultyClass;
    
public voidsetFaultyClassAndField(java.lang.reflect.Field faultyField)

        this.faultyField = faultyField;
        this.faultyClass = faultyField.getDeclaringClass();
    
public voidsetFaultyClassAndMethod(java.lang.reflect.Method faultyMethod)

        this.faultyClass = faultyMethod.getDeclaringClass();
        this.faultyMethod = faultyMethod;
    
public voidsetFaultyClassName(java.lang.String faultyClassName)

        this.faultyClassName = faultyClassName;
    
public voidsetFaultyField(java.lang.reflect.Field faultyField)

        this.faultyField = faultyField;
    
public voidsetFaultyMethod(java.lang.reflect.Method faultyMethod)

        this.faultyMethod = faultyMethod;
    
public voidsetFaultyMethodName(java.lang.String faultyMethodName)

        this.faultyMethodName = faultyMethodName;