本文整理汇总了Java中com.helger.commons.lang.ClassHelper.getClassLocalName方法的典型用法代码示例。如果您正苦于以下问题:Java ClassHelper.getClassLocalName方法的具体用法?Java ClassHelper.getClassLocalName怎么用?Java ClassHelper.getClassLocalName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.helger.commons.lang.ClassHelper
的用法示例。
在下文中一共展示了ClassHelper.getClassLocalName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onAfterInstantiation
import com.helger.commons.lang.ClassHelper; //导入方法依赖的package包/类
@Override
protected void onAfterInstantiation (@Nonnull final IScope aScope)
{
try
{
// MPC manager before PMode manager
m_aMPCMgr = new MPCManager (MPC_XML);
m_aPModeMgr = new PModeManager (PMODE_XML);
m_aProfileMgr = new AS4ProfileManager ();
m_aIncomingDuplicateMgr = new AS4DuplicateManager (INCOMING_DUPLICATE_XML);
_initCallbacks ();
// Validate content
m_aPModeMgr.validateAllPModes ();
s_aLogger.info (ClassHelper.getClassLocalName (this) + " was initialized");
}
catch (final Throwable t)
{
throw new InitializationException ("Failed to init " + ClassHelper.getClassLocalName (this), t);
}
}
示例2: onAfterInstantiation
import com.helger.commons.lang.ClassHelper; //导入方法依赖的package包/类
@Override
protected void onAfterInstantiation (@Nonnull final IScope aScope)
{
try
{
m_aLucene = new PDLucene ();
m_aStorageMgr = new PDStorageManager (m_aLucene);
m_aIndexerMgr = new PDIndexerManager (m_aStorageMgr);
m_aHttpClientMgr = new HttpClientManager ();
s_aLogger.info (ClassHelper.getClassLocalName (this) + " was initialized");
}
catch (final Throwable t)
{
if (GlobalDebug.isProductionMode ())
{
new InternalErrorBuilder ().setThrowable (t)
.addErrorMessage (ClassHelper.getClassLocalName (this) + " init failed")
.handle ();
}
throw new InitializationException ("Failed to init " + ClassHelper.getClassLocalName (this), t);
}
}
示例3: handle
import com.helger.commons.lang.ClassHelper; //导入方法依赖的package包/类
@Override
protected void handle (@Nullable final IReadableResource aRes,
@Nonnull final IErrorLevel aErrorLevel,
@Nullable final IPSElement aSourceElement,
@Nonnull final String sMessage,
@Nullable final Throwable t)
{
final SingleErrorBuilder aBuilder = SingleError.builder ()
.setErrorLevel (aErrorLevel)
.setErrorLocation (aRes == null ? null
: new SimpleLocation (aRes.getResourceID ()))
.setErrorText (sMessage)
.setLinkedException (t);
if (aSourceElement != null)
{
String sField = ClassHelper.getClassLocalName (aSourceElement);
if (aSourceElement instanceof IPSHasID && ((IPSHasID) aSourceElement).hasID ())
sField += " [ID=" + ((IPSHasID) aSourceElement).getID () + "]";
aBuilder.setErrorFieldName (sField);
}
m_aErrorList.add (aBuilder.build ());
}
示例4: onAfterInstantiation
import com.helger.commons.lang.ClassHelper; //导入方法依赖的package包/类
@Override
protected void onAfterInstantiation (@Nonnull final IScope aScope)
{
try
{
// TODO add managers here
// Use only the configured SML (if any)
// By default both official PEPPOL SMLs are queried!
final ISMLInfo aSML = PDServerConfiguration.getSMLToUse ();
if (aSML != null)
PDMetaManager.setBusinessCardProvider (new SMPBusinessCardProvider (aSML));
s_aLogger.info (ClassHelper.getClassLocalName (this) + " was initialized");
}
catch (final Throwable t)
{
if (GlobalDebug.isProductionMode ())
{
new InternalErrorBuilder ().setThrowable (t)
.addErrorMessage (ClassHelper.getClassLocalName (this) + " init failed")
.handle ();
}
throw new InitializationException ("Failed to init " + ClassHelper.getClassLocalName (this), t);
}
}
示例5: _addItem
import com.helger.commons.lang.ClassHelper; //导入方法依赖的package包/类
/**
* Add or update an item. Must only be invoked inside a write-lock.
*
* @param aItem
* The item to be added or updated
* @param eActionType
* The action type. Must be CREATE or UPDATE!
* @throws IllegalArgumentException
* If on CREATE an item with the same ID is already contained. If on
* UPDATE an item with the provided ID does NOT exist.
*/
@MustBeLocked (ELockType.WRITE)
private void _addItem (@Nonnull final IMPLTYPE aItem, @Nonnull final EDAOActionType eActionType)
{
ValueEnforcer.notNull (aItem, "Item");
ValueEnforcer.isTrue (eActionType == EDAOActionType.CREATE || eActionType == EDAOActionType.UPDATE,
"Invalid action type provided!");
final String sID = aItem.getID ();
final IMPLTYPE aOldItem = m_aMap.get (sID);
if (eActionType == EDAOActionType.CREATE)
{
if (aOldItem != null)
throw new IllegalArgumentException (ClassHelper.getClassLocalName (getDataTypeClass ()) +
" with ID '" +
sID +
"' is already in use and can therefore not be created again. Old item = " +
aOldItem +
"; New item = " +
aItem);
}
else
{
// Update
if (aOldItem == null)
throw new IllegalArgumentException (ClassHelper.getClassLocalName (getDataTypeClass ()) +
" with ID '" +
sID +
"' is not yet in use and can therefore not be updated! Updated item = " +
aItem);
}
m_aMap.put (sID, aItem);
}
示例6: getDebugID
import com.helger.commons.lang.ClassHelper; //导入方法依赖的package包/类
@Nonnull
@Nonempty
public final String getDebugID ()
{
String ret = m_sDebugID;
if (ret == null)
m_sDebugID = ret = "<" + ClassHelper.getClassLocalName (this) + "-" + getID () + ">";
return ret;
}
示例7: append
import com.helger.commons.lang.ClassHelper; //导入方法依赖的package包/类
protected static void append (@Nonnull final IJAXBDocumentType e,
@Nonnull final EPhase ePhase,
@Nonnull final StringBuilder aSB,
@Nonnull final String sBuilderClass)
{
final String sType = ClassHelper.getClassLocalName (e.getImplementationClass ());
final String sName = StringHelper.trimEnd (sType, "Type");
final String sBuilderMethodName = Character.toLowerCase (sName.charAt (0)) + sName.substring (1);
switch (ePhase)
{
case READ:
// Builder<T> read ()
aSB.append ("/** Create a reader builder for " +
sName +
".\n" +
"@return The builder and never <code>null</code> */\n");
aSB.append ("@Nonnull public static ")
.append (sBuilderClass)
.append ('<')
.append (sType)
.append ("> ")
.append (sBuilderMethodName)
.append ("(){return ")
.append (sBuilderClass)
.append (".create(")
.append (sType)
.append (".class);}\n");
break;
case WRITE:
// Builder<T> write ()
aSB.append ("/** Create a writer builder for " +
sName +
".\n" +
"@return The builder and never <code>null</code> */\n");
aSB.append ("@Nonnull public static ")
.append (sBuilderClass)
.append ('<')
.append (sType)
.append ("> ")
.append (sBuilderMethodName)
.append ("(){return ")
.append (sBuilderClass)
.append (".create(")
.append (sType)
.append (".class);}\n");
break;
case VALIDATE:
// Builder<T> validate ()
aSB.append ("/** Create a validation builder for " +
sName +
".\n" +
"@return The builder and never <code>null</code> */\n");
aSB.append ("@Nonnull public static ")
.append (sBuilderClass)
.append ('<')
.append (sType)
.append ("> ")
.append (sBuilderMethodName)
.append ("(){return ")
.append (sBuilderClass)
.append (".create(")
.append (sType)
.append (".class);}\n");
break;
}
}