FileDocCategorySizeDatePackage
PrefixedValueAccessorBase.javaAPI DocGlassfish v2 API3976Fri May 04 22:24:08 BST 2007com.sun.enterprise.admin.dottedname.valueaccessor

PrefixedValueAccessorBase

public abstract class PrefixedValueAccessorBase extends ValueAccessorBase

Fields Summary
String
_prefix
Constructors Summary
public PrefixedValueAccessorBase(MBeanServerConnection conn, String prefix)

 //should be overriden by children
    
        
	
		super( conn );
        _prefix = prefix;
	
Methods Summary
java.lang.StringextractPrefixedValueName(java.lang.String dottedName)

        return extractPrefixedValueName(dottedName, false);
    
java.lang.StringextractPrefixedValueName(java.lang.String dottedName, boolean bIncludingPrefix)

        int lastIdx = dottedName.lastIndexOf("."+getDottedNamePrefix());
        lastIdx++;
        if(lastIdx<1)
        {
            if(dottedName.startsWith(getDottedNamePrefix()))
                lastIdx = 0;
            else
                return null;
        }
        if(bIncludingPrefix)
            return dottedName.substring(lastIdx);
        else
            return dottedName.substring(lastIdx+getDottedNamePrefix().length());
    
java.lang.StringgetDottedNamePrefix()

        
        if(_prefix==null)
            throw new RuntimeException("Prefix is not set by children class");
        return _prefix;
    
booleanisDottedNameForAccessor(java.lang.String dottedName)

        return (extractPrefixedValueName(dottedName)!=null);