repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/maven-compiler-plugin | 1,092 | src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleAnnotation.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package mcompiler503;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
public @interface SimpleAnnotation {}
|
apache/maven | 1,129 | impl/maven-logging/src/main/java/org/apache/maven/logging/api/LogLevelRecorder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.logging.api;
public interface LogLevelRecorder {
enum Level {
DEBUG,
INFO,
WARN,
ERROR
}
boolean hasReachedMaxLevel();
Level getMaxLevelReached();
Level getMaxLevelAllowed();
void setMaxLevelAllowed(Level level);
void reset();
}
|
apache/maven | 1,134 | compat/maven-compat/src/main/java/org/apache/maven/ArtifactFilterManagerDelegate.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven;
import java.util.Set;
/**
* @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core extensions.
*/
@Deprecated
public interface ArtifactFilterManagerDelegate {
void addExcludes(Set<String> excludes);
void addCoreExcludes(Set<String> excludes);
}
|
apache/mina-sshd | 1,125 | sshd-common/src/main/java/org/apache/sshd/common/util/threads/ExecutorServiceCarrier.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.common.util.threads;
/**
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
@FunctionalInterface
public interface ExecutorServiceCarrier {
/**
* @return The {@link CloseableExecutorService} to use
*/
CloseableExecutorService getExecutorService();
}
|
apache/mnemonic | 1,138 | mnemonic-common/src/main/java/org/apache/mnemonic/resgc/ContextWrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.mnemonic.resgc;
/**
* the context wrapper interface for registering and callback.
*
* @param <MRES>
* resource type to be holden.
*/
public interface ContextWrapper<MRES> {
MRES getRes();
void setRes(MRES res);
ReclaimContext getContext();
void setContext(ReclaimContext rctx);
}
|
apache/nifi | 1,100 | nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/registry/ClusteredRegistryClientIT.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.tests.system.registry;
import org.apache.nifi.tests.system.NiFiInstanceFactory;
public class ClusteredRegistryClientIT extends RegistryClientIT {
@Override
public NiFiInstanceFactory getInstanceFactory() {
return createTwoNodeInstanceFactory();
}
}
|
apache/nifi | 1,137 | nifi-framework-api/src/main/java/org/apache/nifi/authorization/AuthorizerLookup.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.authorization;
/**
*
*/
public interface AuthorizerLookup {
/**
* Looks up the Authorizer with the specified identifier
*
* @param identifier The identifier of the Authorizer
* @return The Authorizer
*/
Authorizer getAuthorizer(String identifier);
}
|
apache/olingo-odata4 | 1,129 | lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmComplexType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.commons.api.edm;
/**
* A CSDL ComplexType element.
* <br/>
* EdmComplexType holds a set of related information like {@link EdmPrimitiveType} properties and EdmComplexType
* properties.
*/
public interface EdmComplexType extends EdmStructuredType {
@Override
EdmComplexType getBaseType();
}
|
apache/openjpa | 1,114 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/SimpleEmbeddable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.relations;
import jakarta.persistence.Embeddable;
@Embeddable
public class SimpleEmbeddable {
private String embeddedString;
protected SimpleEmbeddable() {
// for JPA
}
public SimpleEmbeddable(String s) {
embeddedString = s;
}
}
|
apache/opennlp | 1,149 | opennlp-api/src/main/java/opennlp/tools/util/ResetableIterator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package opennlp.tools.util;
import java.util.Iterator;
/**
* This interface makes an {@link Iterator} resettable.
*/
public interface ResetableIterator<E> extends Iterator<E> {
/**
* Sets the {@link Iterator} back to the first retrieved element.
* The already processed sequence of elements must be repeated.
*/
void reset();
}
|
apache/openwebbeans | 1,101 | webbeans-impl/src/test/java/org/apache/webbeans/test/profields/beans/stringproducer/StringProducerBean.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.webbeans.test.profields.beans.stringproducer;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Named;
public class StringProducerBean
{
@Produces
@Named("ProMethodNamed1")
String methodN1()
{
return "Sucess from ProMethodNamed1";
}
}
|
apache/openwebbeans | 1,104 | webbeans-impl/src/test/java/org/apache/webbeans/test/specalization/disabledspecialization/LoginService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.webbeans.test.specalization.disabledspecialization;
import jakarta.enterprise.context.Dependent;
/**
* This dummy login service always denies the login attempt.
*/
@Dependent
public class LoginService
{
public boolean login(String userId)
{
return false;
}
}
|
apache/ozone | 1,127 | hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/SnapshotRepair.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.repair.om;
import picocli.CommandLine;
/**
* Tool for snapshot related repairs.
*/
@CommandLine.Command(
name = "snapshot",
description = "Subcommand for all snapshot related repairs.",
subcommands = {
SnapshotChainRepair.class
}
)
public class SnapshotRepair {
}
|
apache/pekko-http | 1,131 | http-core/src/main/java/org/apache/pekko/http/javadsl/model/headers/ContentDisposition.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* license agreements; and to You under the Apache License, version 2.0:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* This file is part of the Apache Pekko project, which was derived from Akka.
*/
/*
* Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
*/
package org.apache.pekko.http.javadsl.model.headers;
/** Model for the `Content-Disposition` header. Specification: http://tools.ietf.org/html/rfc6266 */
public abstract class ContentDisposition extends org.apache.pekko.http.scaladsl.model.HttpHeader {
public abstract ContentDispositionType dispositionType();
public abstract java.util.Map<String, String> getParams();
public static ContentDisposition create(
ContentDispositionType dispositionType, java.util.Map<String, String> params) {
return new org.apache.pekko.http.scaladsl.model.headers.Content$minusDisposition(
((org.apache.pekko.http.scaladsl.model.headers.ContentDispositionType) dispositionType),
org.apache.pekko.http.impl.util.Util.convertMapToScala(params));
}
}
|
apache/phoenix-omid | 1,136 | tso-server/src/main/java/org/apache/omid/tso/RuntimeExceptionPanicker.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.omid.tso;
public class RuntimeExceptionPanicker implements Panicker {
@Override
public void panic(String reason) {
panic(reason, new Throwable("TSO Error"));
}
@Override
public void panic(String reason, Throwable cause) {
throw new RuntimeException(reason, cause);
}
}
|
apache/pinot | 1,128 | pinot-spi/src/main/java/org/apache/pinot/spi/eventlistener/query/BrokerQueryEventListener.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pinot.spi.eventlistener.query;
import org.apache.pinot.spi.env.PinotConfiguration;
import org.apache.pinot.spi.trace.RequestContext;
public interface BrokerQueryEventListener {
void init(PinotConfiguration eventListenerConfiguration);
void onQueryCompletion(RequestContext requestContext);
}
|
apache/pinot | 1,129 | pinot-common/src/main/java/org/apache/pinot/common/exception/HttpErrorStatusException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pinot.common.exception;
public class HttpErrorStatusException extends Exception {
private final int _statusCode;
public HttpErrorStatusException(String message, int statusCode) {
super(message);
_statusCode = statusCode;
}
public int getStatusCode() {
return _statusCode;
}
}
|
apache/poi | 1,131 | poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/shape/exceptions/StopVisitingThisBranch.java | /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.xdgf.usermodel.shape.exceptions;
public class StopVisitingThisBranch extends RuntimeException {
private static final long serialVersionUID = 5262319077534717862L;
}
|
apache/polygene-java | 1,092 | libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/query/joins/CrossJoinedTable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package org.apache.polygene.library.sql.generator.grammar.query.joins;
/**
* This syntax element represents the cross join ({@code CROSS JOIN} between two tables.
*
* @author Stanislav Muhametsin
*/
public interface CrossJoinedTable
extends JoinedTable
{
}
|
apache/polygene-java | 1,119 | tutorials/cargo/src/main/java/org/apache/polygene/tutorials/cargo/step1/OverbookingPolicy.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package org.apache.polygene.tutorials.cargo.step1;
public class OverbookingPolicy
implements BookingPolicy
{
@Override
public boolean isAllowed( Cargo cargo, Voyage voyage )
{
return cargo.getSize() + voyage.getBookedCargoSize() <= voyage.getCapacity() * 1.1;
}
}
|
apache/polygene-java | 1,134 | core/api/src/main/java/org/apache/polygene/api/metrics/MetricsHistogram.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package org.apache.polygene.api.metrics;
/**
* A metric which calculates the distribution of a value.
*
* @see <a href="http://www.johndcook.com/standard_deviation.html">Accurately computing running variance</a>
*/
public interface MetricsHistogram extends Metric
{
void update( long newValue );
}
|
apache/qpid-broker-j | 1,084 | broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/query/ConfiguredObjectExpression.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.qpid.server.management.plugin.servlet.query;
import org.apache.qpid.server.filter.Expression;
import org.apache.qpid.server.model.ConfiguredObject;
public interface ConfiguredObjectExpression<E extends ConfiguredObject<?>> extends Expression<E>
{
}
|
apache/ranger | 1,135 | ranger-tools/src/main/java/org/apache/ranger/policyengine/PerfTestConfiguration.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ranger.policyengine;
import org.apache.ranger.authorization.hadoop.config.RangerConfiguration;
import java.net.URL;
public class PerfTestConfiguration extends RangerConfiguration {
PerfTestConfiguration(URL configURL) {
super();
this.addResourceIfReadable(configURL.getPath());
}
}
|
apache/rocketmq-connect | 1,099 | connectors/rocketmq-connect-redis/src/main/java/org/apache/rocketmq/connect/redis/converter/KVEntryConverter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.rocketmq.connect.redis.converter;
import io.openmessaging.connector.api.data.ConnectRecord;
import java.util.List;
import org.apache.rocketmq.connect.redis.pojo.KVEntry;
public interface KVEntryConverter {
List<ConnectRecord> kVEntryToConnectRecord(KVEntry kvEntry);
}
|
apache/royale-compiler | 1,139 | compiler/src/main/java/org/apache/royale/swf/types/EndShapeRecord.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.royale.swf.types;
/**
* The end shape record simply indicates the end of the shape record array. It
* is a non-edge record with all five flags equal to zero.
*/
public class EndShapeRecord extends ShapeRecord
{
public EndShapeRecord()
{
super(ShapeRecordType.END_SHAPE);
}
}
|
apache/samza | 1,134 | samza-azure/src/main/java/org/apache/samza/coordinator/scheduler/TaskScheduler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.samza.coordinator.scheduler;
import java.util.concurrent.ScheduledFuture;
/**
* Interface for scheduling tasks for Azure Job Coordinator.
*/
public interface TaskScheduler {
ScheduledFuture scheduleTask();
void setStateChangeListener(SchedulerStateChangeListener listener);
void shutdown();
} |
apache/seatunnel-web | 1,086 | seatunnel-datasource/seatunnel-datasource-client/src/main/java/org/apache/seatunnel/datasource/response/PageDataResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seatunnel.datasource.response;
import lombok.Builder;
import lombok.Data;
import java.util.List;
@Data
@Builder
public class PageDataResponse<T> {
private Integer pageNum;
private Integer pageSize;
private Integer total;
private List<T> datas;
}
|
apache/seatunnel-web | 1,110 | seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/ISchemaDerivationService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seatunnel.app.service;
import org.apache.seatunnel.app.domain.request.job.TableSchemaReq;
import org.apache.seatunnel.app.domain.request.job.transform.SQL;
public interface ISchemaDerivationService {
TableSchemaReq derivationSQL(long jobVersionId, String inputPluginId, SQL sql);
}
|
apache/seatunnel | 1,075 | seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/serialize/StarRocksISerializer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seatunnel.connectors.seatunnel.starrocks.serialize;
import org.apache.seatunnel.api.table.type.SeaTunnelRow;
import java.io.Serializable;
public interface StarRocksISerializer extends Serializable {
String serialize(SeaTunnelRow seaTunnelRow);
}
|
apache/seatunnel | 1,085 | seatunnel-connectors-v2/connector-prometheus/src/main/java/org/apache/seatunnel/connectors/seatunnel/prometheus/serialize/Serializer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seatunnel.connectors.seatunnel.prometheus.serialize;
import org.apache.seatunnel.api.table.type.SeaTunnelRow;
import org.apache.seatunnel.connectors.seatunnel.prometheus.sink.Point;
public interface Serializer {
Point serialize(SeaTunnelRow seaTunnelRow);
}
|
apache/seatunnel | 1,091 | seatunnel-connectors-v2/connector-fake/src/test/java/org/apache/seatunnel/connectors/seatunnel/fake/source/FakeFactoryTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seatunnel.connectors.seatunnel.fake.source;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class FakeFactoryTest {
@Test
void optionRule() {
Assertions.assertNotNull((new FakeSourceFactory()).optionRule());
}
}
|
apache/servicecomb-java-chassis | 1,059 | swagger/swagger-invocation/invocation-core/src/main/java/org/apache/servicecomb/swagger/invocation/response/consumer/ConsumerResponseMapperFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.swagger.invocation.response.consumer;
import org.apache.servicecomb.swagger.invocation.response.ResponseMapperFactory;
public interface ConsumerResponseMapperFactory extends ResponseMapperFactory<ConsumerResponseMapper> {
}
|
apache/shardingsphere-elasticjob-ui | 1,037 | shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-backend/src/main/java/org/apache/shardingsphere/elasticjob/lite/ui/security/OAuthCode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shardingsphere.elasticjob.lite.ui.security;
import lombok.Getter;
import lombok.Setter;
/**
* OAuth code
**/
@Getter
@Setter
public final class OAuthCode {
private String code;
private String state;
}
|
apache/shardingsphere-ui | 1,104 | shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/common/domain/CenterConfigs.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shardingsphere.ui.common.domain;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
/**
* Center configs.
*/
@Getter
@Setter
public final class CenterConfigs {
private List<CenterConfig> centerConfigs = new ArrayList<>();
}
|
apache/shardingsphere | 1,063 | examples/shardingsphere-jdbc-example-generator/src/main/java/org/apache/shardingsphere/example/generator/scenario/framework/FrameworkExampleScenario.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shardingsphere.example.generator.scenario.framework;
import org.apache.shardingsphere.example.generator.scenario.ExampleScenario;
/**
* Framework example scenario.
*/
public interface FrameworkExampleScenario extends ExampleScenario {
}
|
apache/shenyu | 1,134 | shenyu-admin/src/test/java/org/apache/shenyu/admin/model/query/MetaDataQueryTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shenyu.admin.model.query;
import org.apache.shenyu.admin.AbstractReflectGetterSetterTest;
/**
* Test case for MetaDataQuery.
*/
public final class MetaDataQueryTest extends AbstractReflectGetterSetterTest {
@Override
protected Class<?> getTargetClass() {
return MetaDataQuery.class;
}
}
|
apache/shenyu | 1,134 | shenyu-admin/src/test/java/org/apache/shenyu/admin/model/query/SelectorQueryTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shenyu.admin.model.query;
import org.apache.shenyu.admin.AbstractReflectGetterSetterTest;
/**
* Test case for SelectorQuery.
*/
public final class SelectorQueryTest extends AbstractReflectGetterSetterTest {
@Override
protected Class<?> getTargetClass() {
return SelectorQuery.class;
}
}
|
apache/skywalking-java | 1,054 | test/plugin/scenarios/shardingsphere-4.0.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/shardingsphere/service/api/repository/OrderItemRepository.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.testcase.shardingsphere.service.api.repository;
import org.apache.skywalking.apm.testcase.shardingsphere.service.api.entity.OrderItem;
public interface OrderItemRepository extends CommonRepository<OrderItem> {
}
|
apache/skywalking-java | 1,054 | test/plugin/scenarios/shardingsphere-5.0.0-scenario/src/main/java/org/apache/skywalking/apm/testcase/shardingsphere/service/api/repository/OrderItemRepository.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.testcase.shardingsphere.service.api.repository;
import org.apache.skywalking.apm.testcase.shardingsphere.service.api.entity.OrderItem;
public interface OrderItemRepository extends CommonRepository<OrderItem> {
}
|
apache/storm | 1,157 | storm-client/src/jvm/org/apache/storm/utils/MutableObject.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package org.apache.storm.utils;
public class MutableObject {
private Object object = null;
public MutableObject() {
}
public MutableObject(Object object) {
this.object = object;
}
public synchronized Object getObject() {
return object;
}
public synchronized void setObject(Object o) {
this.object = o;
}
}
|
apache/stratos | 1,119 | dependencies/jclouds/aws-ec2/src/test/java/org/jclouds/aws/ec2/features/AWSSubnetApiLiveTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.aws.ec2.features;
import org.jclouds.ec2.features.SubnetApiLiveTest;
import org.testng.annotations.Test;
@Test(groups = "live", testName = "AWSSubnetApiLiveTest")
public class AWSSubnetApiLiveTest extends SubnetApiLiveTest {
public AWSSubnetApiLiveTest() {
provider = "aws-ec2";
}
}
|
apache/streampark | 1,084 | streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/mapper/ApplicationBuildPipelineMapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.streampark.console.core.mapper;
import org.apache.streampark.console.core.entity.ApplicationBuildPipeline;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface ApplicationBuildPipelineMapper extends BaseMapper<ApplicationBuildPipeline> {
}
|
apache/streampipes | 1,070 | streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/BufferSide.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.streampipes.processors.geo.jvm.jts.helper.buffer;
public enum BufferSide {
Left(-1), Both(0), Right(1);
private final int number;
BufferSide(int number) {
this.number = number;
}
public int getNumber() {
return number;
}
}
|
apache/streampipes | 1,126 | streampipes-mail/src/main/java/org/apache/streampipes/mail/template/part/LinkPart.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.streampipes.mail.template.part;
import org.apache.streampipes.mail.utils.MailUtils;
public class LinkPart extends AbstractPart {
private final String path;
public LinkPart(String path) {
this.path = path;
}
public String generate() {
return MailUtils.extractBaseUrl() + path;
}
}
|
apache/struts-examples | 1,105 | sitemesh3/src/main/java/org/apache/struts/examples/sitemesh3/HelloAction.java | package org.apache.struts.examples.sitemesh3;
import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.util.Collections;
import java.util.Map;
import java.util.TreeMap;
public class HelloAction extends ActionSupport {
private static final Map<String, String> DECORATORS = Collections.unmodifiableSortedMap(new TreeMap<>() {{
put("1", "Decorator 1");
put("2", "Decorator 2");
put("3", "Exclude from decorating");
}});
private String decorator;
@Override
public String execute() throws Exception {
if ("1".equals(decorator)) {
return SUCCESS;
} else if ("2".equals(decorator)) {
return "other";
}
addActionError("Wrong decorator: " + decorator);
return ERROR;
}
public String getDecorator() {
return decorator;
}
@StrutsParameter
public void setDecorator(String decorator) {
this.decorator = decorator;
}
public Map<String, String> getDecorators() {
return DECORATORS;
}
}
|
apache/struts | 1,141 | plugins/json/src/main/java/org/apache/struts2/json/annotations/SMDMethod.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.json.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface SMDMethod {
String name() default "";
}
|
apache/submarine | 1,107 | submarine-server/server-api/src/main/java/org/apache/submarine/server/api/experiment/ServeResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.submarine.server.api.experiment;
public class ServeResponse {
public String url;
public String getUrl() {
return this.url;
}
public void setUrl(String url) {
this.url = url;
}
public ServeResponse url(String url) {
setUrl(url);
return this;
}
}
|
apache/synapse | 1,137 | modules/core/src/main/java/org/apache/synapse/mediators/annotations/Execute.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.synapse.mediators.annotations;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@Target({METHOD})
@Retention(RUNTIME)
public @interface Execute {
}
|
apache/syncope | 1,123 | core/starter/src/main/java/org/apache/syncope/core/starter/actuate/SyncopeCoreInfoContributor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.core.starter.actuate;
import org.apache.syncope.common.lib.info.SystemInfo;
import org.springframework.context.PayloadApplicationEvent;
@FunctionalInterface
public interface SyncopeCoreInfoContributor {
void addLoadInstant(PayloadApplicationEvent<SystemInfo.LoadInstant> event);
}
|
apache/tapestry-5 | 1,132 | tapestry-core/src/main/java/org/apache/tapestry5/services/ValueLabelProvider.java | // Copyright 2013 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.services;
/**
* An object capable of providing a user-presentable label from a value. A special case exists for
* {@linkplain org.apache.tapestry5.internal.services.EnumValueLabelProvider handling enum types}.
*
* @since 5.4
*/
public interface ValueLabelProvider<V>
{
/**
* Gets label from the value. The label is used as user-presentable label for a value.
* @param value the value to be label provided from
* @return
*/
public String getLabel(V value);
}
|
apache/tez | 1,139 | tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEventType.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tez.dag.app.dag.event;
/**
* Event types handled by Task.
*/
public enum TaskEventType {
//Producer:Client, Job
T_TERMINATE,
//Producer:Job
T_SCHEDULE,
//Producer:Speculator
T_ADD_SPEC_ATTEMPT,
//Producer:TaskAttempt
T_ATTEMPT_LAUNCHED,
T_ATTEMPT_FAILED,
T_ATTEMPT_SUCCEEDED,
T_ATTEMPT_KILLED,
}
|
apache/tika | 1,143 | tika-core/src/main/java/org/apache/tika/metadata/CreativeCommons.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tika.metadata;
/**
* A collection of Creative Commons properties names.
*
* @see <a href="http://www.creativecommons.org/">creativecommons.org</a>
*/
public interface CreativeCommons {
String LICENSE_URL = "License-Url";
String LICENSE_LOCATION = "License-Location";
String WORK_TYPE = "Work-Type";
}
|
apache/tinkerpop | 1,120 | gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/FilteringBarrier.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.tinkerpop.gremlin.process.traversal.step;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.RangeGlobalStep;
/**
* Marker interface for a {@link Barrier} that can behave as a filter, like {@link RangeGlobalStep}
*/
public interface FilteringBarrier<S> extends Barrier<S> {
}
|
apache/tomcat | 1,159 | java/org/apache/catalina/tribes/group/InterceptorPayload.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.tribes.group;
import org.apache.catalina.tribes.ErrorHandler;
public class InterceptorPayload {
private ErrorHandler errorHandler;
public ErrorHandler getErrorHandler() {
return errorHandler;
}
public void setErrorHandler(ErrorHandler errorHandler) {
this.errorHandler = errorHandler;
}
} |
apache/tomee | 1,154 | container/openejb-jee/src/main/java/org/apache/openejb/jee/package-info.java | /**
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter(value = jakarta.xml.bind.annotation.adapters.CollapsedStringAdapter.class, type = String.class)
@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://java.sun.com/xml/ns/javaee", elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.apache.openejb.jee;
|
apache/tomee | 1,155 | examples/mtom/src/test/java/org/superbiz/mtom/EjbServiceTest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.superbiz.mtom;
import org.apache.openejb.testing.EnableServices;
import org.apache.openejb.testing.Module;
@EnableServices("jaxws") // maybe this should be @Inherited like @RunWith
public class EjbServiceTest extends AbstractServiceTest {
@Module
public Class<?>[] module() {
return new Class<?>[]{EjbService.class};
}
}
|
apache/wicket | 1,118 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/link/AutolinkPage_3.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.html.link;
import org.apache.wicket.markup.html.WebPage;
/**
* Mock page for testing.
*
* @author Chris Turner
*/
public class AutolinkPage_3 extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
*/
public AutolinkPage_3()
{
}
}
|
apache/wicket | 1,137 | wicket-core-tests/src/test/java/org/apache/wicket/markup/Doctype_1_InheritedPage.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup;
/**
* A page that inherits another page which have <!DOCTYPE html>. Expectation is that
* MarkupUtil#isMarkupHtml5Compliant(this) will return <code>true</code> for the child page too
*/
public class Doctype_1_InheritedPage extends Doctype_1
{
private static final long serialVersionUID = 1L;
}
|
apache/xmlgraphics-batik | 1,122 | batik-svggen/src/main/java/org/apache/batik/svggen/font/table/FeatureTags.java | /*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.apache.batik.svggen.font.table;
/**
* Definition of Feature tags
*
* @version $Id$
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
*/
public interface FeatureTags {
String FEATURE_TAG_INIT = "init";
String FEATURE_TAG_MEDI = "medi";
String FEATURE_TAG_FINA = "fina";
}
|
apache/xmlgraphics-fop | 1,143 | fop-core/src/test/java/org/apache/fop/fo/pagination/AllTests.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* $Id$ */
package org.apache.fop.fo.pagination;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* All test to be added in FOTreeTestSuite
*
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({ PageSequenceMasterTestCase.class,
RepeatablePageMasterAlternativesTestCase.class })
public final class AllTests {
}
|
google/binnavi | 1,105 | src/main/java/com/google/security/zynamics/binnavi/debug/connection/packets/commands/RequestMemoryMapCommand.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.debug.connection.packets.commands;
import com.google.security.zynamics.binnavi.debug.connection.DebugCommandType;
/**
* Command class used to request the memory map of the active process.
*/
public final class RequestMemoryMapCommand extends DebugCommand {
/**
* Creates a memory map command.
*
* @param packetId Packet ID of the command.
*/
public RequestMemoryMapCommand(final int packetId) {
super(DebugCommandType.CMD_MEMMAP, packetId);
}
}
|
google/binnavi | 1,111 | src/main/java/com/google/security/zynamics/binnavi/Gui/Debug/RemoteBrowser/FileBrowser/CRemoteFileView.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.Gui.Debug.RemoteBrowser.FileBrowser;
import java.io.File;
import javax.swing.filechooser.FileView;
/**
* Used to customize how file names are shown in the remote file browser.
*/
public final class CRemoteFileView extends FileView {
@Override
public String getName(final File file) {
// Show full names for drives and only unqualified names for directories and files
return CRemoteBrowserHelpers.isDrive(file) ? file.getAbsolutePath() : file.getName();
}
}
|
google/binnavi | 1,120 | src/test/java/com/google/security/zynamics/binnavi/Common/GenericEquivalenceRelationFactory.java | /*
Copyright 2014 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.google.security.zynamics.binnavi.Common;
/**
* Factory interface used by the GenericEquivalenceRelationTest class to test arbitrary types. The
* usefulness of the tests executed by the GenericEquivalenceRelationTest class is based on the fact
* that all three instances are different in terms of equals().
*
* @author jannewger@google.com (Jan Newger)
*
*/
public interface GenericEquivalenceRelationFactory<T> {
public T createFirstInstance();
public T createSecondInstance();
public T createThirdInstance();
}
|
google/blockly-android | 1,127 | blocklylib-core/src/main/java/com/google/blockly/utils/StringOutputStream.java | /*
* Copyright 2015 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.blockly.utils;
import java.io.IOException;
import java.io.OutputStream;
/**
* OutputStream extension that wraps a StringBuffer for use in xml loading and serialization.
*/
public class StringOutputStream extends OutputStream {
private final StringBuffer mBuffer = new StringBuffer();
@Override
public void write(int i) throws IOException {
mBuffer.append((char) i);
}
@Override
public String toString() {
return mBuffer.toString();
}
}
|
google/guava | 1,155 | android/guava/src/com/google/common/base/IgnoreJRERequirement.java | /*
* Copyright 2019 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.common.base;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Target;
/**
* Disables Animal Sniffer's checking of compatibility with older versions of Java/Android.
*
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
*/
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
@interface IgnoreJRERequirement {}
|
google/guava | 1,155 | android/guava/src/com/google/common/hash/IgnoreJRERequirement.java | /*
* Copyright 2019 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.common.hash;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Target;
/**
* Disables Animal Sniffer's checking of compatibility with older versions of Java/Android.
*
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
*/
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
@interface IgnoreJRERequirement {}
|
google/guava | 1,155 | android/guava/src/com/google/common/math/IgnoreJRERequirement.java | /*
* Copyright 2019 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.common.math;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Target;
/**
* Disables Animal Sniffer's checking of compatibility with older versions of Java/Android.
*
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
*/
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
@interface IgnoreJRERequirement {}
|
google/j2cl | 1,115 | transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester445.java | /*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package allsimplebridges;
import static com.google.j2cl.integration.testing.Asserts.assertTrue;
public class Tester445 {
static class C1 {
C1() {}
public String get(Object value) {
return "C1.get";
}
}
static class C2 extends C1 {
C2() {}
@Override
public String get(Object value) {
return "C2.get";
}
}
public static void test() {
C2 s = new C2();
assertTrue(s.get(new Object()).equals("C2.get"));
assertTrue(((C1) s).get("").equals("C2.get"));
}
}
|
google/j2objc | 1,090 | jre_emul/apache_harmony/classlib/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox0411.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.beans.tests.support.mock;
public class FakeFox0411 extends FakeFox041 {
public int[] getThreeProp() {
return null;
}
// throwing PropertyVetoException makes this property constrained.
public void setThreeProp(int[] i) {
}
}
|
google/jimfs | 1,141 | jimfs/src/main/java/com/google/common/jimfs/InternalCharMatcher.java | /*
* Copyright 2013 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.jimfs;
import java.util.Arrays;
/**
* Simple replacement for the real CharMatcher until it's out of @Beta.
*
* @author Colin Decker
*/
final class InternalCharMatcher {
public static InternalCharMatcher anyOf(String chars) {
return new InternalCharMatcher(chars);
}
private final char[] chars;
private InternalCharMatcher(String chars) {
this.chars = chars.toCharArray();
Arrays.sort(this.chars);
}
public boolean matches(char c) {
return Arrays.binarySearch(chars, c) >= 0;
}
}
|
google/libphonenumber | 1,122 | java/demo/src/main/java/com/google/phonenumbers/demo/render/LibPhoneNumberRenderer.java | /*
* Copyright (C) 2022 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @author Tobias Rogg
*/
package com.google.phonenumbers.demo.render;
import com.google.template.soy.data.SoyTemplate;
import com.google.template.soy.jbcsrc.api.SoySauce;
import com.google.template.soy.jbcsrc.api.SoySauceBuilder;
public abstract class LibPhoneNumberRenderer<T extends SoyTemplate> {
String render(T soyTemplate) {
SoySauce soySauce = new SoySauceBuilder().build();
return soySauce.newRenderer(soyTemplate).renderHtml().get().toString();
}
public abstract String genHtml();
}
|
google/oss-fuzz | 1,120 | projects/struts/struts2-fuzzer/webapp/src/main/java/org/apache/struts/test/TestAction.java | // Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
package org.apache.struts.test;
import org.apache.struts2.ActionSupport;
public class TestAction extends ActionSupport {
private String subject = "World (from Java)";
public String execute() {
return ActionSupport.SUCCESS;
}
public String getSubject() {
return this.subject;
}
public void setSubject(String subject) {
if (subject != null) {
this.subject = subject;
}
}
} |
google/search-samples | 1,113 | app-indexing-start/app/src/main/java/com/recipe_app/client/database/RecipeNoteTable.java | /*
* Copyright 2014 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.recipe_app.client.database;
public class RecipeNoteTable {
public static final String TABLE = "recipe_notes";
public static final String ID_COLUMN = "_id";
public static final String ID = TABLE + "." + ID_COLUMN;
public static final String RECIPE_ID_COLUMN ="recipe_id";
public static final String RECIPE_ID = TABLE + "." + RECIPE_ID_COLUMN;
public static final String TEXT_COLUMN = "text";
public static final String TEXT = TABLE + "." + TEXT_COLUMN;
}
|
googleapis/google-cloud-java | 1,041 | java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/DeployIssueModelResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.contactcenterinsights.v1;
public interface DeployIssueModelResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.DeployIssueModelResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,041 | java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/ExportIssueModelResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.contactcenterinsights.v1;
public interface ExportIssueModelResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.ExportIssueModelResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,041 | java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/ImportIssueModelResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.contactcenterinsights.v1;
public interface ImportIssueModelResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.ImportIssueModelResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,043 | java-artifact-registry/proto-google-cloud-artifact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ImportAptArtifactsMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/devtools/artifactregistry/v1beta2/apt_artifact.proto
// Protobuf Java Version: 3.25.8
package com.google.devtools.artifactregistry.v1beta2;
public interface ImportAptArtifactsMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,043 | java-artifact-registry/proto-google-cloud-artifact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ImportYumArtifactsMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/devtools/artifactregistry/v1beta2/yum_artifact.proto
// Protobuf Java Version: 3.25.8
package com.google.devtools.artifactregistry.v1beta2;
public interface ImportYumArtifactsMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,045 | java-financialservices/proto-google-cloud-financialservices-v1/src/main/java/com/google/cloud/financialservices/v1/ExportBacktestResultMetadataResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/financialservices/v1/backtest_result.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.financialservices.v1;
public interface ExportBacktestResultMetadataResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.financialservices.v1.ExportBacktestResultMetadataResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,049 | java-workspaceevents/proto-google-cloud-workspaceevents-v1beta/src/main/java/com/google/apps/events/subscriptions/v1beta/CreateSubscriptionMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/apps/events/subscriptions/v1beta/subscriptions_service.proto
// Protobuf Java Version: 3.25.8
package com.google.apps.events.subscriptions.v1beta;
public interface CreateSubscriptionMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.apps.events.subscriptions.v1beta.CreateSubscriptionMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,049 | java-workspaceevents/proto-google-cloud-workspaceevents-v1beta/src/main/java/com/google/apps/events/subscriptions/v1beta/DeleteSubscriptionMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/apps/events/subscriptions/v1beta/subscriptions_service.proto
// Protobuf Java Version: 3.25.8
package com.google.apps.events.subscriptions.v1beta;
public interface DeleteSubscriptionMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.apps.events.subscriptions.v1beta.DeleteSubscriptionMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,049 | java-workspaceevents/proto-google-cloud-workspaceevents-v1beta/src/main/java/com/google/apps/events/subscriptions/v1beta/UpdateSubscriptionMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/apps/events/subscriptions/v1beta/subscriptions_service.proto
// Protobuf Java Version: 3.25.8
package com.google.apps.events.subscriptions.v1beta;
public interface UpdateSubscriptionMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.apps.events.subscriptions.v1beta.UpdateSubscriptionMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googlearchive/gwt-google-apis | 1,129 | gadgets/gadgets/src/com/google/gwt/gadgets/client/NeedsLockedDomain.java | /*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.gwt.gadgets.client;
import com.google.gwt.gadgets.client.GadgetFeature.FeatureName;
/**
* The locked-domain library isolates your gadgets from other gadgets running on
* the same page. We suggest that you add this feature requirement to your
* gadget if your gadget stores sensitive private user data.
*
* This feature is only supported on iGoogle. Other gadget containers may not
* support this feature and will reject your gadget.
*/
@FeatureName("locked-domain")
public interface NeedsLockedDomain {
}
|
googleworkspace/java-samples | 1,144 | classroom/snippets/src/test/java/TestDeleteGuardian.java | // Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import com.google.api.client.googleapis.json.GoogleJsonResponseException;
import org.junit.Assert;
import org.junit.Test;
// Unit test class for Delete Guardian classroom snippet
public class TestDeleteGuardian {
@Test
public void testDeleteGuardian() throws Exception {
String studentId = "insert_student_id";
String guardianId = "insert_guardian_id";
DeleteGuardian.deleteGuardian(studentId, guardianId);
Assert.assertThrows(
GoogleJsonResponseException.class, () -> GetGuardian.getGuardian(studentId, guardianId));
}
}
|
hibernate/hibernate-ogm | 1,060 | mongodb/src/test/java/org/hibernate/ogm/datastore/mongodb/test/id/objectid/BarKeeper.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.datastore.mongodb.test.id.objectid;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import org.bson.types.ObjectId;
/**
* @author Gunnar Morling
*/
@Entity
public class BarKeeper {
private ObjectId id;
private String name;
private Drink favoriteDrink;
BarKeeper() {
}
BarKeeper(ObjectId id, String name) {
this.id = id;
this.name = name;
}
@Id
public ObjectId getId() {
return id;
}
public void setId(ObjectId id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@ManyToOne
public Drink getFavoriteDrink() {
return favoriteDrink;
}
public void setFavoriteDrink(Drink favoriteDrink) {
this.favoriteDrink = favoriteDrink;
}
}
|
hibernate/hibernate-orm | 1,075 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytoone/Car.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.manytoone;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.ForeignKey;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
/**
* Many to one sample using default mapping values
*
* @author Emmanuel Bernard
*/
@Entity
public class Car {
private Integer id;
private Color bodyColor;
private Parent owner;
@Id
@GeneratedValue
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(foreignKey = @ForeignKey(name="BODY_COLOR_FK"))
public Color getBodyColor() {
return bodyColor;
}
public void setBodyColor(Color bodyColor) {
this.bodyColor = bodyColor;
}
@ManyToOne
public Parent getOwner() {
return owner;
}
public void setOwner(Parent owner) {
this.owner = owner;
}
}
|
hibernate/hibernate-orm | 1,116 | hibernate-core/src/main/java/org/hibernate/generator/values/GeneratedValues.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.generator.values;
import java.util.List;
import org.hibernate.metamodel.mapping.ModelPart;
/**
* A container for {@linkplain org.hibernate.generator.OnExecutionGenerator database generated values}
* retrieved by the mutation operation. The values are stored relative to the {@linkplain ModelPart property}
* they represent.
*
* @author Marco Belladelli
* @see org.hibernate.generator.OnExecutionGenerator
*/
public interface GeneratedValues {
/**
* Register a generated value for the corresponding {@link ModelPart}
*/
void addGeneratedValue(ModelPart modelPart, Object value);
/**
* Retrieve a generated value for the requested {@link ModelPart}.
*/
Object getGeneratedValue(ModelPart modelPart);
/**
* Retrieves a list of generated values corresponding to the list of requested {@link ModelPart}s.
* Ensures the order of the values in the returned list corresponds to the input properties.
*/
List<Object> getGeneratedValues(List<? extends ModelPart> modelParts);
}
|
hibernate/hibernate-search | 1,069 | mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/mapping/definition/annotation/processing/impl/EntityProjectionProcessor.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.impl;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.EntityProjection;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.MethodParameterMappingAnnotationProcessor;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.MethodParameterMappingAnnotationProcessorContext;
import org.hibernate.search.mapper.pojo.mapping.definition.programmatic.MethodParameterMappingStep;
import org.hibernate.search.mapper.pojo.search.definition.binding.builtin.EntityProjectionBinder;
public final class EntityProjectionProcessor
implements MethodParameterMappingAnnotationProcessor<EntityProjection> {
@Override
public void process(MethodParameterMappingStep mapping, EntityProjection annotation,
MethodParameterMappingAnnotationProcessorContext context) {
mapping.projection( EntityProjectionBinder.create() );
}
}
|
hibernate/hibernate-search | 1,074 | engine/src/main/java/org/hibernate/search/engine/search/sort/dsl/impl/CompositeSortComponentsStepImpl.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.engine.search.sort.dsl.impl;
import org.hibernate.search.engine.search.sort.SearchSort;
import org.hibernate.search.engine.search.sort.dsl.CompositeSortComponentsStep;
import org.hibernate.search.engine.search.sort.dsl.TypedSearchSortFactory;
import org.hibernate.search.engine.search.sort.dsl.spi.SearchSortDslContext;
public final class CompositeSortComponentsStepImpl<SR>
implements CompositeSortComponentsStep<SR, CompositeSortComponentsStepImpl<SR>> {
private SearchSortDslContext<SR, ?, ?> dslContext;
public CompositeSortComponentsStepImpl(SearchSortDslContext<SR, ?, ?> dslContext) {
this.dslContext = dslContext;
}
@Override
public CompositeSortComponentsStepImpl<SR> add(SearchSort searchSort) {
dslContext = dslContext.append( searchSort );
return this;
}
@Override
public TypedSearchSortFactory<SR> then() {
return dslContext.then();
}
@Override
public SearchSort toSort() {
return dslContext.toSort();
}
}
|
hibernate/hibernate-search | 1,096 | engine/src/main/java/org/hibernate/search/engine/search/predicate/dsl/ExtendedSearchPredicateFactory.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.engine.search.predicate.dsl;
import org.hibernate.search.util.common.SearchException;
import org.hibernate.search.util.common.annotation.Incubating;
/**
* A base interface for subtypes of {@link TypedSearchPredicateFactory} allowing to
* easily override the self type for all relevant methods.
* <p>
* <strong>Warning:</strong> Generic parameters of this type are subject to change,
* so this type should not be referenced directly in user code.
*
* @param <SR> Scope root type.
* @param <S> The self type, i.e. the exposed type of this factory.
*/
public interface ExtendedSearchPredicateFactory<SR, S extends ExtendedSearchPredicateFactory<SR, ?>>
extends TypedSearchPredicateFactory<SR> {
@Override
S withRoot(String objectFieldPath);
/**
* @throws SearchException In case the current factory cannot be rescoped for the {@code scopeRootType}.
*/
@Incubating
<SR2> ExtendedSearchPredicateFactory<SR2, ?> withScopeRoot(Class<SR2> scopeRootType);
}
|
hibernate/hibernate-validator | 1,042 | documentation/src/test/java/org/hibernate/validator/referenceguide/chapter12/constraintapi/Marathon.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.validator.referenceguide.chapter12.constraintapi;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class Marathon implements Tournament {
private String name;
/**
* Intentionally without a getter/setter to test adding a constraint programmatically using field access type
*/
@SuppressWarnings("unused")
private long numberOfHelpers;
private Date tournamentDate;
private final List<Runner> runners;
public Marathon() {
runners = new ArrayList<Runner>();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public Date getTournamentDate() {
return tournamentDate;
}
public void setTournamentDate(Date tournamentDate) {
this.tournamentDate = tournamentDate;
}
public List<Runner> getRunners() {
return runners;
}
public boolean addRunner(Runner runner) {
return runners.add( runner );
}
}
|
openjdk/jdk8 | 1,154 | hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/SpaceClosure.java | /*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
package sun.jvm.hotspot.memory;
public interface SpaceClosure {
public void doSpace(Space s);
}
|
openjdk/jdk8 | 1,165 | langtools/test/tools/javac/processing/model/util/Superless.java | /*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// A class with a missing superclass. Used by GetTypeElemBadArg.java.
class Superless extends MissingClass {
}
|
openjdk/jdk8 | 1,168 | langtools/test/tools/javac/protectedInner/pkg1/Base.java | /*
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// Part of test ../ProtecteInner.java
package pkg1;
public class Base {
protected void baseMethod() {
}
}
|
openjdk/jdk8 | 1,176 | jdk/test/java/lang/ClassLoader/deadlock/Bob.java | /*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package comSB;
public class Bob extends comSA.SupBob {
static {
System.out.println("comSB.Bob loaded");
}
}
|
openjdk/jtreg | 1,195 | test/groups/d1/d11/Test.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
*/
public class Test {
public static void main(String... args) {
System.err.println(System.getProperties());
}
}
|
openjdk/jtreg | 1,195 | test/groups/d1/d12/Test.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
*/
public class Test {
public static void main(String... args) {
System.err.println(System.getProperties());
}
}
|
openjdk/jtreg | 1,195 | test/groups/d1/d13/Test.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
*/
public class Test {
public static void main(String... args) {
System.err.println(System.getProperties());
}
}
|
openjdk/jtreg | 1,195 | test/groups/d3/d31/Test.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
*/
public class Test {
public static void main(String... args) {
System.err.println(System.getProperties());
}
}
|
openjdk/jtreg | 1,195 | test/groups/d3/d32/Test.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
*/
public class Test {
public static void main(String... args) {
System.err.println(System.getProperties());
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.