当前位置: 首页>>代码示例>>Java>>正文


Java OverridingMethodsMustInvokeSuper类代码示例

本文整理汇总了Java中javax.annotation.OverridingMethodsMustInvokeSuper的典型用法代码示例。如果您正苦于以下问题:Java OverridingMethodsMustInvokeSuper类的具体用法?Java OverridingMethodsMustInvokeSuper怎么用?Java OverridingMethodsMustInvokeSuper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


OverridingMethodsMustInvokeSuper类属于javax.annotation包,在下文中一共展示了OverridingMethodsMustInvokeSuper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: preRenderCallback

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
@Override
@OverridingMethodsMustInvokeSuper
protected void preRenderCallback(T entity, float partialTickTime) {
    this.playerModel.getModel().isSneak = false;
    this.playerModel.getModel().isFlying = false;
    this.playerModel.getModel().isSleeping = false;

    ResourceLocation loc = getEntityTexture(entity);
    this.playerModel.apply(MineLittlePony.getInstance().getManager().getPony(loc).getMetadata());

    if (mainModel.isChild) {
        this.shadowSize = 0.25F;
    } else if (MineLittlePony.getConfig().showscale) {
        this.shadowSize = 0.4F;
    } else {
        this.shadowSize = 0.5F;
    }
}
 
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:19,代码来源:RenderPonyMob.java

示例2: parseArguments

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
/**
 * Parses the command line input. Returns the tool instance to be run (which may or may not be this instance).
 * <p>
 * IMPORTANT: When overriding this method, you must remove any option (arg starting with "-")
 * that you have already handled to avoid getting an "unknown option" failure.
 *
 * @see #removeFirst(String, String...)
 */
@OverridingMethodsMustInvokeSuper
protected Tool parseArguments(String[] args) throws Exception {
    for (String arg : options(args)) {
        if (arg.equals("--debug")) {
            checkArgument(verbosity == Level.DEFAULT, "Specify one of: --quiet --verbose --debug");
            setVerbosity(Level.DEBUG);
        } else if (arg.equals("--verbose")) {
            checkArgument(verbosity == Level.DEFAULT, "Specify one of: --quiet --verbose --debug");
            setVerbosity(Level.VERBOSE);
        } else if (arg.equals("--quiet")) {
            checkArgument(verbosity == Level.DEFAULT, "Specify one of: --quiet --verbose --debug");
            setVerbosity(Level.QUIET);
        } else if (arg.equals("--pretty")) {
            setPretty(true);
        } else {
            return unknownOption(arg);
        }
    }
    return this;
}
 
开发者ID:blackducksoftware,项目名称:bdio,代码行数:29,代码来源:Tool.java

示例3: loadFinished

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
/**
 * Called by {@link #load(IAllocationRequest)} right before exiting.<br>
 * In this method, implementors can do final polishing because the loader exits.
 * <p>
 * <b>IMPORTANT:</b> overriding methods should invoke {@code super}, unless they know what they do.
 * <p>
 * gh #460: this implementation handles aggregate HU and updates their PackingMaterial items.
 * Afterwards it invokes {@link IMutableAllocationResult#aggregateTransactions()} to combine all trx candidates that belong to the same (aggregate) VHU.
 *
 * @param result_IGNORED current result (that will be also returned by {@link #load(IAllocationRequest)} method); won't be changed by this method, but maybe by overriding methods.
 */
@OverridingMethodsMustInvokeSuper
protected void loadFinished(final IMutableAllocationResult result_IGNORED, final IHUContext huContext)
{
	// TODO: i think we can move this stuff or something better into a model interceptor that is fired when item.qty is changed
	_createdHUs.forEach(
			hu -> {
				final IAttributeStorage attributeStorage = huContext.getHUAttributeStorageFactory().getAttributeStorage(hu);
				final IWeightable weightable = Services.get(IWeightableFactory.class).createWeightableOrNull(attributeStorage);
				final I_M_Attribute weightTareAttribute = weightable.getWeightTareAttribute();
				if (attributeStorage.hasAttribute(weightTareAttribute))
				{
					final BigDecimal tareOfHU = WeightTareAttributeValueCallout.calculateWeightTare(hu);

					final BigDecimal taresOfChildren = attributeStorage
							.getChildAttributeStorages(true) // loadIfNeeded=true because we need to make sure to have all tares that exist. not matter if those storages are already on memory or no.
							.stream()
							.filter(s -> s.hasAttribute(weightTareAttribute))
							.map(s -> s.getValueAsBigDecimal(weightTareAttribute))
							.reduce(BigDecimal.ZERO, BigDecimal::add);

					attributeStorage
							.setValue(weightTareAttribute, tareOfHU.add(taresOfChildren));
				}
			});
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:37,代码来源:AbstractProducerDestination.java

示例4: dispose

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
@Override
@OverridingMethodsMustInvokeSuper
public void dispose()
{
	_lines = Collections.emptyList();
	_linesAll = Collections.emptyList();

	if (rowsTableModel != null)
	{
		if (rowTableModelListener != null)
		{
			rowsTableModel.removeTerminalTableModelListener(rowTableModelListener);
			rowTableModelListener = null;
		}
	}
	disposed = true;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:18,代码来源:AbstractHUSelectModel.java

示例5: dispose

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
@Override
@OverridingMethodsMustInvokeSuper
public void dispose()
{
	if (isDisposed())
	{
		return; // nothing to do
	}
	modelListener = null; // because it's the last reference, we expect this listener to expire in model

	if (model != null)
	{
		// NOTE: we are not disposing it because we did not create it
		model = null;
	}

	disposed = true;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:19,代码来源:HUEditorPanel.java

示例6: dispose

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
@Override
@OverridingMethodsMustInvokeSuper
public void dispose()
{
	super.dispose();

	_nameBuilder = NullHUKeyNameBuilder.instance;

	//
	// Clear properties
	properties.clear();

	//
	// Unlink from parent, but just unset the reference. setParent(null) causes a lot of listeners etc being fired and properties being update that we don't need.
	// this.parent is also an IHUKey (i.e. IDisposable), so be can assume that it will be disposed too, and we don't have to try to ensure it from here.
	// setParent(null);
	this.parent = null;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:19,代码来源:AbstractHUKey.java

示例7: dispose

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
@Override
@OverridingMethodsMustInvokeSuper
public void dispose()
{
	if (isDisposed())
	{
		return; // nothing to do
	}
	// pcs.clear(); // not needed since pcs was created by the terminalContext

	// not needed since they added themselves as disposable components in their constructors
	// DisposableHelper.disposeAll(breadcrumbKeyLayout, _huKeyFilterModel, handlingUnitsKeyLayout, propertiesPanelModel);

	rootHUKey = null;
	_currentKey = null;
	_selectedKeyIds.clear();

	clearCache();
	disposed = true;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:21,代码来源:HUEditorModel.java

示例8: initialize

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
@Override
@OverridingMethodsMustInvokeSuper
protected void initialize()
{
	setupMRP();
	setupHandlingUnits();
	setupPOS();

	setupMiscWorkaroundsAndMocks();

	// Misc masterdata
	bpartner_Customer01 = createBPartner("BP_Customer01");
	bpartner_Customer01.setIsCustomer(true);
	bpartner_Customer01.setIsVendor(false);
	InterfaceWrapperHelper.save(bpartner_Customer01);

	// Get misc services:
	ddOrderDAO = Services.get(IDDOrderDAO.class);
	ddOrderBL = Services.get(IDDOrderBL.class);
	LogManager.setLoggerLevel(logger, Level.INFO);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:22,代码来源:AbstractHUDDOrderProcessIntegrationTest.java

示例9: flushAndStopQueuing

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
/**
 * Flush queued events and stop queuing.
 */
@OverridingMethodsMustInvokeSuper
public QueueableForwardingEventBus flushAndStopQueuing()
{
	if (!queuing)
	{
		return this;
	}

	this.queuing = false;

	// make sure our queue is empty
	flush();

	return this;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:19,代码来源:QueueableForwardingEventBus.java

示例10: updateSpecialColumnsName

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
@Override
@OverridingMethodsMustInvokeSuper
public void updateSpecialColumnsName(final PO to)
{
	if (!isBase())
	{
		final POInfo poInfo = to.getPOInfo();
		if (poInfo.hasColumnName(COLUMNNAME_Name) && DisplayType.isText(poInfo.getColumnDisplayType(COLUMNNAME_Name)))
		{
			makeUnique(to, COLUMNNAME_Name);
		}

		if (poInfo.hasColumnName(COLUMNNAME_Value))
		{
			makeUnique(to, COLUMNNAME_Value);
		}
	}

}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:20,代码来源:GeneralCopyRecordSupport.java

示例11: setParameter

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
/**
 * Sets parameter.
 * 
 * @param name parameter name
 * @param value parameter value or <code>null</code> if you want the parameter to be removed.
 */
@OverridingMethodsMustInvokeSuper
public AdempiereException setParameter(@NonNull final String name, @Nullable final Object value)
{
	// avoid setting null values because it will fail on getParameters() which is returning an ImmutableMap
	if (value == null)
	{
		// remove the parameter if any
		if (parameters != null)
		{
			parameters.remove(name);
		}
		return this;
	}

	if (parameters == null)
	{
		parameters = new LinkedHashMap<>();
	}

	parameters.put(name, value);
	resetMessageBuilt();

	return this;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:31,代码来源:AdempiereException.java

示例12: dispose

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
@Override
@OverridingMethodsMustInvokeSuper
public void dispose()
{
	buttonActionListener = null;

	 // not created here, so we don't dispose them
	caller = NullTerminalKeyListener.instance;
	renderer = DefaultKeyPanelRenderer.instance;

	keyLayout = null;

	if (keyLayoutInfoMap != null)
	{
		keyLayoutInfoMap.clear();
	}
	disposed = true;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:19,代码来源:TerminalKeyPanel.java

示例13: step_validate_before_aggregation

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
/**
 * Checks the stuff that shall be the same among all subclasses/tests.
 */
@Override
@OverridingMethodsMustInvokeSuper
protected void step_validate_before_aggregation(List<I_C_Invoice_Candidate> invoiceCandidates, List<I_M_InOutLine> inOutLines)
{
	final I_C_Invoice_Candidate ic = invoiceCandidates.get(0);

	if (config_getQualityDiscount_Override() == null)
	{
		assertThat(InterfaceWrapperHelper.isNull(ic, I_C_Invoice_Candidate.COLUMNNAME_QualityDiscountPercent_Override), is(true));
	}
	else
	{
		assertThat(InterfaceWrapperHelper.isNull(ic, I_C_Invoice_Candidate.COLUMNNAME_QualityDiscountPercent_Override), is(false));
		assertThat(ic.getQualityDiscountPercent_Override(), comparesEqualTo(config_getQualityDiscount_Override()));
	}
	// Required because QualityDiscountPercent_Override will be applied to the QtyDelivered, and if we have invoiceRule "immediate", then qtyDelivered make a difference at all.
	assertThat((String)InterfaceWrapperHelper.getValueOverrideOrValue(ic, I_C_Invoice_Candidate.COLUMNNAME_InvoiceRule), is(X_C_Invoice_Candidate.INVOICERULE_NachLieferung));
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:22,代码来源:AbstractTestQualityDiscountPercentOverride.java

示例14: step_validate_after_aggregation

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
@Override
@OverridingMethodsMustInvokeSuper
protected void step_validate_after_aggregation(List<I_C_Invoice_Candidate> invoiceCandidates, List<I_M_InOutLine> inOutLines, List<IInvoiceHeader> invoices)
{
	assertEquals("We are expecting one invoice: " + invoices, 1, invoices.size());

	final IInvoiceHeader invoice1 = invoices.get(0); // don't remove, because the subclass implementation might also want to get it.

	assertThat(invoice1.getPOReference(), is(IC_PO_REFERENCE));
	assertThat(invoice1.getDateAcct(), is(IC_DATE_ACCT));

	assertThat(invoice1.isSOTrx(), is(false));

	final List<IInvoiceLineRW> invoiceLines1 = getInvoiceLines(invoice1);
	assertEquals("We are expecting one invoice line: " + invoiceLines1, 1, invoiceLines1.size());

	final IInvoiceLineRW il1 = getSingleForInOutLine(invoiceLines1, iol11);
	assertNotNull("Missing IInvoiceLineRW for iol111=" + iol11, il1);
	assertThat(il1.getC_InvoiceCandidate_InOutLine_IDs().size(), equalTo(1));
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:21,代码来源:AbstractTestQualityDiscountPercentOverride.java

示例15: init

import javax.annotation.OverridingMethodsMustInvokeSuper; //导入依赖的package包/类
@Before
@OverridingMethodsMustInvokeSuper
public void init()
{
	final Properties ctx = Env.getCtx();
	Env.setContext(ctx, Env.CTXNAME_AD_Client_ID, 1);
	Env.setContext(ctx, Env.CTXNAME_AD_Language, "de_CH");

	manualHandler = InterfaceWrapperHelper.create(ctx, I_C_ILCandHandler.class, Trx.createTrxName());
	manualHandler.setTableName(ManualCandidateHandler.MANUAL);
	manualHandler.setClassname(ManualCandidateHandler.class.getName());
	InterfaceWrapperHelper.save(manualHandler);

	// registerModelInterceptors(); doesn't work well with the legacy tests. Only register then in AbstractNewAggregationEngineTests

	LogManager.setLevel(Level.DEBUG);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:18,代码来源:AbstractAggregationEngineTestBase.java


注:本文中的javax.annotation.OverridingMethodsMustInvokeSuper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。