repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/maven-surefire | 1,045 | maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/ReportTestStub.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.plugins.surefire.report.stubs;
public class ReportTestStub extends SurefireReportMavenProjectStub {
@Override
protected String getProjectDirName() {
return "basic-surefire-report-test";
}
}
|
apache/maven | 1,066 | impl/maven-impl/src/main/java/org/apache/maven/impl/model/reflection/IntrospectionException.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.impl.model.reflection;
public class IntrospectionException extends Exception {
IntrospectionException(String message) {
super(message);
}
IntrospectionException(Throwable cause) {
super(cause);
}
}
|
apache/mina-sshd | 1,082 | sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelHolder.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.channel;
/**
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
@FunctionalInterface
public interface ChannelHolder {
/**
* @return The associated {@link Channel} instance
*/
Channel getChannel();
}
|
apache/myfaces | 1,080 | impl/src/main/java/org/apache/myfaces/config/element/FacesFlowParameter.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.myfaces.config.element;
import java.io.Serializable;
/**
*
* @author Leonardo Uribe
*/
public abstract class FacesFlowParameter implements Serializable
{
public abstract String getName();
public abstract String getValue();
}
|
apache/nifi | 1,066 | nifi-toolkit/nifi-toolkit-client/src/main/java/org/apache/nifi/toolkit/client/RequestConfig.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.toolkit.client;
import java.util.Map;
/**
* Configuration applied to each client request.
*/
public interface RequestConfig {
/**
* @return the headers to apply to each request
*/
Map<String, String> getHeaders();
}
|
apache/olingo-odata4 | 1,056 | lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/annotation/EdmAnnotationPath.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.annotation;
/**
* Represents an annotation path
*/
public interface EdmAnnotationPath extends EdmDynamicExpression {
/**
* Value of the path
* @return value of the path
*/
String getValue();
}
|
apache/olingo-odata4 | 1,074 | lib/server-api/src/main/java/org/apache/olingo/server/api/uri/UriResourceCount.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.server.api.uri;
/**
* Used to describe an $count used within an resource path
* For example: http://.../serviceroot/entityset(1)/$count
*/
public interface UriResourceCount extends UriResource {
// No additional methods needed for now.
}
|
apache/openjpa | 1,050 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/InterfaceTest2.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.kernel.common.apps;
/**
* <p>Interface used in testing</p>
*
* @author Abe White
*/
public interface InterfaceTest2
extends InterfaceTest {
int getIntField();
void setIntField(int i);
}
|
apache/openwebbeans | 1,061 | webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/zoo/Horse.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.injection.generics.zoo;
/**
*/
public class Horse implements Animal
{
@Override
public int getLegCount()
{
return 4;
}
@Override
public String getName()
{
return "horse";
}
}
|
apache/openwebbeans | 1,069 | webbeans-impl/src/test/java/org/apache/webbeans/test/specalization/Pen.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;
import jakarta.inject.Inject;
public class Pen implements IPen {
String str;
@Inject
public Pen() {
this.str = "";
}
@Override
public String getID() {
return str + " Pen";
}
}
|
apache/ozone | 1,094 | hadoop-ozone/tools/src/main/java/org/apache/ozone/graph/Edge.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.ozone.graph;
import org.jgrapht.graph.DefaultEdge;
/**
* Overrides the {@link DefaultEdge} so that it doesn't print source and target
* vertex names in the image.
*/
public class Edge extends DefaultEdge {
@Override
public String toString() {
return "";
}
}
|
apache/paimon | 1,058 | paimon-common/src/test/resources/codesplit/declaration/expected/TestRewriteLocalVariableInForLoop2.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.
*/
public class TestRewriteLocalVariableInForLoop2 {
int sum;
int local$0;
public void myFun(int[] arr) {
sum = 0;
for (int item : arr) {local$0 = item;
sum += local$0;
}
System.out.println(sum);
}
}
|
apache/pekko-connectors | 1,079 | mongodb/src/test/java/docs/javadsl/Number.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) since 2016 Lightbend Inc. <https://www.lightbend.com>
*/
package docs.javadsl;
import java.util.Objects;
// #pojo
public final class Number {
private Integer _id;
public Number() {}
public Number(Integer _id) {
this._id = _id;
}
public void setId(Integer _id) {
this._id = _id;
}
public Integer getId() {
return _id;
}
// #pojo
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Number number = (Number) o;
return Objects.equals(_id, number._id);
}
@Override
public int hashCode() {
return Objects.hash(_id);
}
@Override
public String toString() {
return "Number{" + "_id=" + _id + '}';
}
// #pojo
}
// #pojo
|
apache/phoenix-omid | 1,095 | metrics/src/main/java/org/apache/omid/metrics/Meter.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.metrics;
public interface Meter extends Metric {
/**
* Mark the occurrence of an event.
*/
void mark();
/**
* Mark the occurrence of a given number of events.
*
* @param n the number of events
*/
void mark(long n);
}
|
apache/phoenix | 1,066 | phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixMonitoredPreparedStatement.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.phoenix.jdbc;
import java.sql.PreparedStatement;
/**
* This interface is for phoenix statement that provide operation Type
*/
public interface PhoenixMonitoredPreparedStatement
extends PreparedStatement, PhoenixMonitoredStatement {
}
|
apache/phoenix | 1,067 | phoenix-pherf/src/main/java/org/apache/phoenix/pherf/workload/mt/operations/QueryOperation.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.phoenix.pherf.workload.mt.operations;
import org.apache.phoenix.pherf.configuration.Query;
/**
* Defines a query operation.
* @see {@link OperationType#SELECT}
*/
public interface QueryOperation extends Operation {
Query getQuery();
}
|
apache/pig | 1,097 | test/e2e/pig/udfs/java/org/apache/pig/test/udf/evalfunc/Nil.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.pig.test.udf.evalfunc;
import java.io.IOException;
import org.apache.pig.EvalFunc;
import org.apache.pig.data.Tuple;
public class Nil extends EvalFunc<String>
{
//@Override
public String exec(Tuple input) throws IOException
{
return null;
}
}
|
apache/pig | 1,124 | src/org/apache/pig/builtin/TAN.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.pig.builtin;
/**
* TAN implements a binding to the Java function
* {@link java.lang.Math#tan(double) Math.tan(double)}.
* Given a single data atom it Returns the tangent of the argument.
*
*/
public class TAN extends DoubleBase{
Double compute(Double input){
return Math.tan(input);
}
}
|
apache/plc4x | 1,081 | plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/ParseException.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
*
* 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 org.apache.plc4x.java.spi.generation;
public class ParseException extends Exception {
public ParseException(String message) {
super(message);
}
public ParseException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/poi | 1,110 | poi/src/main/java/org/apache/poi/ss/usermodel/PaneType.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.ss.usermodel;
/**
* Type of pane used in sheet.
* @since POI 5.2.3
*/
public enum PaneType {
LOWER_RIGHT, UPPER_RIGHT, LOWER_LEFT, UPPER_LEFT
}
|
apache/polaris | 1,066 | polaris-core/src/main/java/org/apache/polaris/core/persistence/resolver/ResolverPrincipalRole.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.polaris.core.persistence.resolver;
/** Expected principal type for the principal. Expectation depends on the REST request type */
public enum ResolverPrincipalRole {
ANY_PRINCIPAL,
CATALOG_ADMIN_PRINCIPAL,
SERVICE_ADMIN_PRINCIPAL
}
|
apache/polygene-java | 1,054 | libraries/spring/src/test/java/org/apache/polygene/library/spring/bootstrap/ToUppercaseService.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.spring.bootstrap;
public class ToUppercaseService
implements TextProcessingService
{
public String process( final String text )
{
return text.toUpperCase();
}
}
|
apache/polygene-java | 1,065 | libraries/rdf/src/main/java/org/apache/polygene/library/rdf/serializer/N3Serializer.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.rdf.serializer;
import org.openrdf.rio.n3.N3WriterFactory;
public final class N3Serializer extends AbstractSerializer
{
public N3Serializer()
{
super( N3WriterFactory.class );
}
}
|
apache/polygene-java | 1,065 | manual/src/main/java/org/apache/polygene/manual/recipes/createEntity/ManufacturerEntity.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.manual.recipes.createEntity;
import org.apache.polygene.api.identity.HasIdentity;
// START SNIPPET: composite
public interface ManufacturerEntity extends HasIdentity, Manufacturer
{}
// END SNIPPET: composite |
apache/polygene-java | 1,082 | core/testsupport/src/main/java/org/apache/polygene/test/model/Host.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.test.model;
import org.apache.polygene.api.property.Property;
import org.apache.polygene.api.value.ValueComposite;
/**
* JAVADOC Add JavaDoc.
*/
public interface Host extends ValueComposite
{
Property<String> value();
}
|
apache/polygene-java | 1,089 | core/api/src/main/java/org/apache/polygene/api/util/Visitable.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.util;
/**
* Interface that visitable objects should implement.
*/
public interface Visitable<T>
{
<ThrowableType extends Throwable> boolean accept( Visitor<? super T, ThrowableType> visitor )
throws ThrowableType;
}
|
apache/qpid-broker-j | 1,043 | broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEventSender.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.protocol.v0_10;
import org.apache.qpid.server.protocol.v0_10.transport.ProtocolEvent;
public interface ProtocolEventSender
{
void send(ProtocolEvent msg);
void flush();
void close();
}
|
apache/qpid-broker-j | 1,052 | systests/protocol-tests-amqp-1-0/src/main/java/org/apache/qpid/tests/protocol/v1_0/EmptyResponse.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.tests.protocol.v1_0;
import org.apache.qpid.tests.protocol.Response;
public class EmptyResponse implements Response<EmptyResponse>
{
@Override
public EmptyResponse getBody()
{
return this;
}
}
|
apache/rocketmq-connect | 1,035 | rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/controller/distributed/DistributedConfig.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.runtime.controller.distributed;
import org.apache.rocketmq.connect.runtime.config.WorkerConfig;
/**
* distributed worker config
*/
public class DistributedConfig extends WorkerConfig {
}
|
apache/royale-compiler | 1,067 | compiler-common/src/main/java/org/apache/royale/compiler/caches/ICSSDocumentCache.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.compiler.caches;
/**
* {@code ISWCManager} is a repository of SWC library models. It has all the SWC
* libraries shared within a workspace.
*/
public interface ICSSDocumentCache
{
// TODO populate with methods
}
|
apache/royale-compiler | 1,083 | compiler/src/main/java/org/apache/royale/swf/types/MorphGradient.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;
import java.util.ArrayList;
/**
* Morph gradient data type.
*/
public class MorphGradient extends ArrayList<MorphGradRecord> implements IDataType
{
private static final long serialVersionUID = 1552815648930799684L;
}
|
apache/rya | 1,050 | extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/ConvexHullRdf4J.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.rya.indexing.pcj.functions.geo;
public class ConvexHullRdf4J extends FunctionAdapter {
public ConvexHullRdf4J() {
super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.ConvexHull());
}
}
|
apache/rya | 1,050 | extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/DifferenceRdf4J.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.rya.indexing.pcj.functions.geo;
public class DifferenceRdf4J extends FunctionAdapter {
public DifferenceRdf4J() {
super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.Difference());
}
}
|
apache/rya | 1,050 | extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhContainsRdf4J.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.rya.indexing.pcj.functions.geo;
public class EhContainsRdf4J extends FunctionAdapter {
public EhContainsRdf4J() {
super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.EhContains());
}
}
|
apache/rya | 1,050 | extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhDisjointRdf4J.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.rya.indexing.pcj.functions.geo;
public class EhDisjointRdf4J extends FunctionAdapter {
public EhDisjointRdf4J() {
super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.EhDisjoint());
}
}
|
apache/rya | 1,050 | extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfContainsRdf4J.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.rya.indexing.pcj.functions.geo;
public class SfContainsRdf4J extends FunctionAdapter {
public SfContainsRdf4J() {
super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.SfContains());
}
}
|
apache/rya | 1,050 | extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfDisjointRdf4J.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.rya.indexing.pcj.functions.geo;
public class SfDisjointRdf4J extends FunctionAdapter {
public SfDisjointRdf4J() {
super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.SfDisjoint());
}
}
|
apache/rya | 1,050 | extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfOverlapsRdf4J.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.rya.indexing.pcj.functions.geo;
public class SfOverlapsRdf4J extends FunctionAdapter {
public SfOverlapsRdf4J() {
super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.SfOverlaps());
}
}
|
apache/seatunnel-web | 1,041 | seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/script/UpdateScriptParamDto.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.domain.dto.script;
import lombok.Builder;
import lombok.Data;
import java.util.Map;
@Builder
@Data
public class UpdateScriptParamDto {
private int scriptId;
private Map<String, String> params;
}
|
apache/servicecomb-toolkit | 1,037 | oas-generator/oas-generator-core/src/main/java/org/apache/servicecomb/toolkit/generator/context/ISchemaContext.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.toolkit.generator.context;
import io.swagger.v3.oas.models.media.Schema;
public interface ISchemaContext extends Context, IExtensionsContext {
Schema getSchema();
void setSchema(Schema schema);
} |
apache/shardingsphere | 1,028 | features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/AlwaysFalseShardingCondition.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.sharding.route.engine.condition;
import lombok.ToString;
/**
* Always false sharding condition.
*/
@ToString
public final class AlwaysFalseShardingCondition extends ShardingCondition {
}
|
apache/shardingsphere | 1,042 | parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/enums/SubqueryType.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.sql.parser.statement.core.enums;
/**
* Subquery type.
*/
public enum SubqueryType {
PROJECTION, TABLE, JOIN, PREDICATE, INSERT_SELECT, EXISTS, WITH, VIEW_DEFINITION, UPDATE_JOIN, DELETE_JOIN
}
|
apache/shardingsphere | 1,062 | agent/api/src/main/java/org/apache/shardingsphere/agent/api/advice/TargetAdviceMethod.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.agent.api.advice;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* Target advice method.
*/
@RequiredArgsConstructor
@Getter
public final class TargetAdviceMethod {
private final String name;
}
|
apache/shiro | 1,062 | integration-tests/jakarta-ee/src/main/java/org/apache/shiro/testing/jakarta/ee/UseFallback.java | /*
* 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.shiro.testing.jakarta.ee;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;
import org.apache.shiro.ee.filters.Forms.FallbackPredicate;
import javax.servlet.http.HttpServletRequest;
/**
* Fallback if we are an auth page
*/
@Named
@ApplicationScoped
public class UseFallback implements FallbackPredicate {
@Override
public boolean useFallback(String path, HttpServletRequest request) {
return path.contains("shiro/auth/");
}
}
|
apache/skywalking-java | 1,036 | apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/Constants.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.plugin.finagle;
public class Constants {
public static final String PENDING_OP_NAME = "pending";
public static final SWContextCarrier EMPTY_SWCONTEXTCARRIER = new SWContextCarrier();
}
|
apache/skywalking | 1,066 | oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/WorkPathTest.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.oap.server.core;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class WorkPathTest {
@Test
public void testPath() {
Assertions.assertTrue(WorkPath.getPath().exists());
}
}
|
apache/storm | 1,087 | storm-client/src/jvm/org/apache/storm/trident/operation/BaseMultiReducer.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.trident.operation;
import java.util.Map;
public abstract class BaseMultiReducer<T> implements MultiReducer<T> {
@Override
public void prepare(Map<String, Object> conf, TridentMultiReducerContext context) {
}
@Override
public void cleanup() {
}
}
|
apache/streampipes | 1,037 | streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/callback/SiddhiDebugCallback.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.wrapper.siddhi.engine.callback;
import io.siddhi.core.event.Event;
import java.util.List;
public interface SiddhiDebugCallback {
void onEvent(Event event);
void onEvent(List<Event> events);
}
|
apache/streampipes | 1,057 | streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/compact/CreateOptions.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.model.connect.adapter.compact;
import com.fasterxml.jackson.annotation.JsonInclude;
@JsonInclude(JsonInclude.Include.NON_NULL)
public record CreateOptions(Boolean persist,
Boolean start) {
}
|
apache/struts-examples | 1,039 | exception-handling/src/main/java/org/apache/struts/register/model/Person.java | package org.apache.struts.register.model;
/**
* Models a Person who registers.
* @author bruce phillips
*
*/
public class Person
{
private String firstName;
private String lastName;
private String email;
private int age;
public String getFirstName()
{
return firstName;
}
public void setFirstName(String firstName)
{
this.firstName = firstName;
}
public String getLastName()
{
return lastName;
}
public void setLastName(String lastName)
{
this.lastName = lastName;
}
public String getEmail()
{
return email;
}
public void setEmail(String email)
{
this.email = email;
}
public int getAge()
{
return age;
}
public void setAge( int age)
{
this.age = age;
}
public String toString()
{
return "First Name: " + getFirstName() + " Last Name: " + getLastName() +
" Email: " + getEmail() + " Age: " + getAge() ;
}
}
|
apache/struts | 1,091 | plugins/json/src/test/java/org/apache/struts2/json/TestAction4.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;
public class TestAction4 {
private Bean bean;
public Bean getBean() {
if (this.bean == null)
this.bean = new Bean();
return this.bean;
}
public void setBean(Bean bean) {
this.bean = bean;
}
}
|
apache/struts | 1,098 | core/src/main/java/org/apache/struts2/util/Evaluated.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.util;
public class Evaluated {
private final Object value;
public Evaluated(Object value) {
this.value = value;
}
public boolean isDefined() {
return value != null;
}
public Object get() {
return value;
}
}
|
apache/tapestry-5 | 1,073 | tapestry-spock/src/main/java/org/apache/tapestry5/spock/ExtensionModule.java | /*
* Copyright 2009, 2011 the original author or 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 org.apache.tapestry5.spock;
import org.apache.tapestry5.commons.ObjectLocator;
import org.apache.tapestry5.ioc.annotations.Marker;
/**
* A Tapestry module that is started for every specification which uses Spock's
* Tapestry extension.
*
* @author Peter Niederwieser
*/
@Marker(SpockTapestry.class)
public class ExtensionModule
{
public static ObjectLocator build(ObjectLocator locator)
{
return locator;
}
}
|
apache/tomcat | 1,089 | test/org/apache/catalina/servlets/TestDefaultServletEncodingWithoutBom.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.servlets;
import org.apache.catalina.servlets.DefaultServlet.BomConfig;
public class TestDefaultServletEncodingWithoutBom extends DefaultServletEncodingBaseTest {
@Override
protected BomConfig getUseBom() {
return BomConfig.FALSE;
}
}
|
apache/tomcat | 1,126 | java/jakarta/websocket/OnMessage.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 jakarta.websocket;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface OnMessage {
long maxMessageSize() default -1;
}
|
apache/tomee | 1,059 | examples/webservice-ws-with-resources-config/src/main/java/org/superbiz/ws/security/CalculatorBean.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.ws.security;
import jakarta.ejb.Singleton;
import jakarta.jws.WebService;
@Singleton
@WebService
public class CalculatorBean implements Calculator {
@Override
public int add(int op1, int op2) {
return op1 + op2;
}
}
|
apache/trafodion | 1,080 | core/conn/trafci/src/main/java/org/trafodion/ci/NullKeyWordException.java | // @@@ START COPYRIGHT @@@
//
// 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.
//
// @@@ END COPYRIGHT @@@
package org.trafodion.ci;
public class NullKeyWordException extends InterfaceQueryException
{
/**
*
*/
private static final long serialVersionUID = 1L;
NullKeyWordException()
{
super();
}
}
|
apache/wicket | 1,032 | wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/message/IWebSocketMessage.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.protocol.ws.api.message;
import org.apache.wicket.util.io.IClusterable;
/**
* A marker interface for all message types
*
* @since 6.0
*/
public interface IWebSocketMessage extends IClusterable
{
}
|
apache/wicket | 1,056 | wicket-core-tests/src/test/java/org/apache/wicket/markup/resolver/issue3559/WicketApplication.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.resolver.issue3559;
import org.apache.wicket.protocol.http.WebApplication;
/**
*
*/
class WicketApplication extends WebApplication
{
@Override
public Class<HomePage> getHomePage()
{
return HomePage.class;
}
}
|
apache/wicket | 1,060 | wicket-cdi-tests/src/test/java/org/apache/wicket/cdi/testapp/AlternativeTestAppScope.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.cdi.testapp;
import jakarta.enterprise.inject.Alternative;
/**
* @author jsarman
*/
@Alternative
public class AlternativeTestAppScope extends TestAppScope
{
@Override
public String test()
{
return "Alternative ok";
}
}
|
apache/wicket | 1,073 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/internal/BasePage.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.internal;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.request.mapper.parameter.PageParameters;
public class BasePage extends WebPage {
BasePage(PageParameters parameters)
{
super(parameters);
}
}
|
apache/wicket | 1,076 | wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.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.examples.template;
import org.apache.wicket.examples.WicketExamplePage;
/**
* Home page of the template example.
*
* @author Eelco Hillenius
*/
public class Index extends WicketExamplePage
{
/**
* Constructor
*/
public Index()
{
}
} |
google-gemini/api-examples | 1,080 | java/src/test/java/com/example/gemini/FunctionCallingTest.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.
*/
package com.example.gemini;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertNotNull;
public class FunctionCallingTest {
@Test
public void test_functionCalling() {
Double result = assertDoesNotThrow(FunctionCalling::functionCalling,
"functionCalling returned an error");
assertNotNull(result, "Response should not be null");
}
}
|
google/binnavi | 1,058 | src/main/java/com/google/security/zynamics/zylib/types/graphs/algorithms/MalformedGraphException.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.zylib.types.graphs.algorithms;
/**
* Exception that is used to signal that there is something wrong with the graph.
*/
public class MalformedGraphException extends Exception {
private static final long serialVersionUID = 7422498674681635996L;
/**
* Creates a new MalformedGraphException object.
*
* @param msg The exception message.
*/
public MalformedGraphException(final String msg) {
super(msg);
}
}
|
google/binnavi | 1,080 | src/main/java/com/google/security/zynamics/binnavi/Gui/Debug/RelocationDialog/_Doc.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.RelocationDialog;
/**
* This package contains classes that can be used to show a dialog that tells the user about
* incorrectly set image bases. In normal use, this dialog is used to tell the user about incorrect
* image bases whenever the debug client notices a difference between the specified image base of a
* module in BinNavi and the real image base of a module as picked up by the debug client in the
* target process.
*/
|
google/closure-compiler | 1,091 | src/com/google/javascript/jscomp/ant/Warning.java | /*
* Copyright 2012 The Closure Compiler 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.javascript.jscomp.ant;
import com.google.javascript.jscomp.CheckLevel;
/** Simple representation of a warning flag in Ant */
public final class Warning {
private String group;
private CheckLevel level;
public String getGroup() {
return group;
}
public void setGroup(String group) {
this.group = group;
}
public CheckLevel getLevel() {
return level;
}
public void setLevel(CheckLevel level) {
this.level = level;
}
}
|
google/error-prone | 1,055 | core/src/test/java/com/google/errorprone/refaster/testdata/input/InferLambdaTypeExample.java | /*
* Copyright 2016 The Error Prone 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.errorprone.refaster.testdata;
import java.util.Arrays;
import java.util.stream.Collectors;
public class InferLambdaTypeExample {
public void example() {
System.out.println(
Arrays.asList("foo", "bar")
.stream()
.collect(Collectors.reducing((String a, String b) -> b)));
System.out.println(
Arrays.asList("foo", "bar").stream().collect(Collectors.reducing((a, b) -> b)));
}
}
|
google/filament | 1,050 | third_party/dawn/third_party/protobuf/java/core/src/main/java/com/google/protobuf/NewInstanceSchemas.java | // Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
package com.google.protobuf;
@CheckReturnValue
final class NewInstanceSchemas {
private static final NewInstanceSchema FULL_SCHEMA = loadSchemaForFullRuntime();
private static final NewInstanceSchema LITE_SCHEMA = new NewInstanceSchemaLite();
static NewInstanceSchema full() {
return FULL_SCHEMA;
}
static NewInstanceSchema lite() {
return LITE_SCHEMA;
}
private static NewInstanceSchema loadSchemaForFullRuntime() {
if (Protobuf.assumeLiteRuntime) {
return null;
}
try {
Class<?> clazz = Class.forName("com.google.protobuf.NewInstanceSchemaFull");
return (NewInstanceSchema) clazz.getDeclaredConstructor().newInstance();
} catch (Exception e) {
return null;
}
}
private NewInstanceSchemas() {}
}
|
google/guava | 1,072 | android/guava-testlib/src/com/google/common/collect/testing/TestCollectionGenerator.java | /*
* Copyright (C) 2007 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.collect.testing;
import com.google.common.annotations.GwtCompatible;
import java.util.Collection;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Creates collections, containing sample elements, to be tested.
*
* @author Kevin Bourrillion
*/
@GwtCompatible
@NullMarked
public interface TestCollectionGenerator<E extends @Nullable Object>
extends TestContainerGenerator<Collection<E>, E> {}
|
google/guava | 1,078 | android/guava-tests/test/com/google/common/collect/HashBasedTableColumnTest.java | /*
* Copyright (C) 2008 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.collect;
import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.TableCollectionTest.ColumnTests;
import org.jspecify.annotations.NullMarked;
@GwtCompatible
@NullMarked
public class HashBasedTableColumnTest extends ColumnTests {
public HashBasedTableColumnTest() {
super(false, true, true, true, false);
}
@Override
Table<String, Character, Integer> makeTable() {
return HashBasedTable.create();
}
}
|
google/guava | 1,078 | android/guava-tests/test/com/google/common/collect/TreeBasedTableColumnTest.java | /*
* Copyright (C) 2008 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.collect;
import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.TableCollectionTest.ColumnTests;
import org.jspecify.annotations.NullMarked;
@GwtCompatible
@NullMarked
public class TreeBasedTableColumnTest extends ColumnTests {
public TreeBasedTableColumnTest() {
super(false, true, true, true, false);
}
@Override
Table<String, Character, Integer> makeTable() {
return TreeBasedTable.create();
}
}
|
google/j2cl | 1,068 | junit/generator/javatests/com/google/j2cl/junit/integration/testing/async/super/Timer.java | /*
* Copyright 2016 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.j2cl.junit.integration.testing.async;
import jsinterop.annotations.JsFunction;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsPackage;
/** A simple timer for tests */
public class Timer {
/** A simple callback interface */
@JsFunction
public interface Callback {
void execute();
}
@JsMethod(name = "setTimeout", namespace = JsPackage.GLOBAL)
public static native void schedule(final Callback c, final int delay);
}
|
google/sagetv | 1,105 | java/sage/miniclient/WinInfraredReceive.java | /*
* Copyright 2015 The SageTV Authors. 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 sage.miniclient;
import sage.SageTVInputCallback;
/**
*
* @author Narflex
*/
public class WinInfraredReceive extends sage.SageTVInfraredReceive
{
/** Creates a new instance of WinInfraredReceive */
public WinInfraredReceive()
{
super();
}
public boolean openInputPlugin(SageTVInputCallback callback)
{
irmanPortString = MiniClient.myProperties.getProperty(IRMAN_RCV_PORT, "");
evtRtr = callback;
setupIRReceivePort();
return true;
}
}
|
googleapis/gapic-generator | 1,079 | src/main/java/com/google/api/codegen/configgen/InterfaceTransformer.java | /* Copyright 2017 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.
*/
package com.google.api.codegen.configgen;
import com.google.api.codegen.config.InterfaceModel;
import java.util.Map;
/** Generates API source specific interface data. */
public interface InterfaceTransformer {
/**
* Examines all of the resource paths used by the given apiInterface, and returns a map from each
* unique resource paths to a short name used by the collection configuration.
*/
Map<String, String> getResourceToEntityNameMap(InterfaceModel apiInterface);
}
|
googlemaps/react-native-navigation-sdk | 1,056 | android/src/main/java/com/google/android/react/navsdk/IMapViewFragment.java | /**
* Copyright 2023 Google LLC
*
* <p>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
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>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.android.react.navsdk;
import android.view.View;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.libraries.navigation.StylingOptions;
public interface IMapViewFragment {
MapViewController getMapController();
void setStylingOptions(StylingOptions stylingOptions);
void applyStylingOptions();
void setMapStyle(String url);
GoogleMap getGoogleMap();
// Fragment
boolean isAdded();
View getView();
}
|
googlesamples/io2015-codelabs | 1,055 | search-samples/app-indexing/app/src/main/java/com/recipe_app/client/HomeActivity.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;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import com.recipe_app.R;
/**
* This Activity class defines the home screen for the recipe app.
*/
public class HomeActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
}
}
|
hibernate/hibernate-ogm | 1,025 | infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/options/navigation/impl/InfinispanEntityContextImpl.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.infinispan.options.navigation.impl;
import org.hibernate.ogm.datastore.infinispan.options.navigation.InfinispanEntityContext;
import org.hibernate.ogm.datastore.infinispan.options.navigation.InfinispanPropertyContext;
import org.hibernate.ogm.datastore.keyvalue.options.navigation.spi.BaseKeyValueStoreEntityContext;
import org.hibernate.ogm.options.navigation.spi.ConfigurationContext;
/**
* Converts Infinispan entity-level options.
*
* @author Gunnar Morling
*/
public abstract class InfinispanEntityContextImpl extends BaseKeyValueStoreEntityContext<InfinispanEntityContext, InfinispanPropertyContext> implements
InfinispanEntityContext {
public InfinispanEntityContextImpl(ConfigurationContext context) {
super( context );
}
}
|
hibernate/hibernate-orm | 1,025 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/cid/TvProgramIdClass.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.cid;
import java.util.Date;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.PrimaryKeyJoinColumn;
import jakarta.persistence.SecondaryTable;
import jakarta.persistence.Temporal;
import jakarta.persistence.TemporalType;
@Entity
@SecondaryTable( name = "TV_PROGRAM_IDCLASS", pkJoinColumns =
{
@PrimaryKeyJoinColumn( name = "CHANNEL_ID" ),
@PrimaryKeyJoinColumn( name = "PRESENTER_NAME" )
} )
@IdClass( TvMagazinPk.class )
public class TvProgramIdClass {
@Id
@JoinColumn(nullable=false)
public Channel channel;
@Id
@JoinColumn(nullable=false)
public Presenter presenter;
@Temporal( TemporalType.TIME )
@Column(name="`time`")
Date time;
@Column( name = "TXT", table = "TV_PROGRAM_IDCLASS" )
public String text;
}
|
hibernate/hibernate-orm | 1,027 | hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/BagAnnotation.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Bag;
import org.hibernate.models.spi.ModelsContext;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class BagAnnotation implements Bag {
/**
* Used in creating dynamic annotation instances (e.g. from XML)
*/
public BagAnnotation(ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from JDK variant
*/
public BagAnnotation(Bag annotation, ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from Jandex variant
*/
public BagAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) {
}
@Override
public Class<? extends Annotation> annotationType() {
return Bag.class;
}
}
|
openjdk/jdk8 | 1,104 | langtools/test/tools/javac/defaultMethods/static/import/pkg/C.java | /*
* Copyright (c) 2012, 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.
*/
package pkg;
public class C implements A { }
|
openjdk/jdk8 | 1,107 | langtools/test/tools/javac/warnings/6594914/DeprecatedClass.java | /*
* Copyright (c) 2011, 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.
*/
@Deprecated
class DeprecatedClass extends Exception {}
|
openjdk/jdk8 | 1,116 | langtools/test/tools/javac/miranda/4686811/p1/A.java | /*
* Copyright (c) 2002, 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 p1;
public abstract class A {
abstract void f();
}
|
openjdk/jtreg | 1,135 | test/debug/ExplicitCompile.java | /*
* Copyright (c) 2015, 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
* @compile ExplicitCompile.java
*/
public class ExplicitCompile { }
|
openjdk/jtreg | 1,139 | test/rerun/std/MainTest.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 MainTest {
public static void main(String... args) { }
}
|
openjdk/skara | 1,130 | encoding/src/main/java/module-info.java | /*
* Copyright (c) 2019, 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.
*/
module org.openjdk.skara.encoding {
exports org.openjdk.skara.encoding;
}
|
oracle-quickstart/oci-cloudnative | 1,061 | src/carts/src/main/java/mushop/carts/Item.java | package mushop.carts;
import java.math.BigDecimal;
import java.util.UUID;
public class Item {
private String id;
private String itemId;
private int quantity;
private BigDecimal unitPrice;
public Item() {
this.id = UUID.randomUUID().toString();
this.quantity = 1;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getItemId() {
return itemId;
}
public void setItemId(String itemId) {
this.itemId = itemId;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public BigDecimal getUnitPrice() {
return unitPrice;
}
public void setUnitPrice(BigDecimal unitPrice) {
this.unitPrice = unitPrice;
}
@Override
public String toString() {
return "Item [id=" + id + ", itemId=" + itemId + ", quantity=" + quantity + ", unitPrice=" + unitPrice + "]";
}
}
|
oracle/oci-java-sdk | 1,075 | bmc-circuitbreaker/src/main/java/com/oracle/bmc/circuitbreaker/CircuitBreakerState.java | /**
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/
package com.oracle.bmc.circuitbreaker;
public enum CircuitBreakerState {
/**
* A DISABLED breaker is not operating (no state transition, no events) and allowing all
* requests through.
*/
DISABLED,
/** A CLOSED breaker is operating normally and allowing requests through. */
CLOSED,
/** An OPEN breaker has tripped and will not allow requests through. */
OPEN,
/**
* A FORCED_OPEN breaker is not operating (no state transition, no events) and not allowing any
* requests through.
*/
FORCED_OPEN,
/** A HALF_OPEN breaker has completed its wait interval and will allow requests */
HALF_OPEN,
/** The underlying implementation has an unmapped state */
UNKNOWN
}
|
apache/curator | 1,061 | curator-framework/src/main/java/org/apache/curator/framework/api/transaction/TransactionCheckBuilder.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.curator.framework.api.transaction;
import org.apache.curator.framework.api.Pathable;
import org.apache.curator.framework.api.Versionable;
public interface TransactionCheckBuilder<T> extends Pathable<T>, Versionable<Pathable<T>> {}
|
apache/derby | 1,094 | java/org.apache.derby.tools/org/apache/derby/jdbc/ClientDriver.java | /*
Derby - Class org.apache.derby.jdbc.ClientDriver
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.derby.jdbc;
import org.apache.derby.client.ClientAutoloadedDriver;
/**
* The client JDBC driver (type 4) for Derby.
*/
public class ClientDriver extends ClientAutoloadedDriver
{
public ClientDriver() { super(); }
}
|
apache/doris-manager | 1,040 | manager/general/src/main/java/org/apache/doris/stack/exception/IdaasConnectionException.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.doris.stack.exception;
public class IdaasConnectionException extends Exception {
public static final String MESSAGE = "Idaas配置信息有误,请修改后重试";
public IdaasConnectionException() {
super(MESSAGE);
}
}
|
apache/dubbo-samples | 1,042 | 11-quickstart/quickstart-service/src/test/java/org/apache/dubbo/samples/quickstart/QuickStartApplicationTests.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.dubbo.samples.quickstart;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class QuickStartApplicationTests {
@Test
void contextLoads() {
}
}
|
apache/dubbo-samples | 1,057 | 1-basic/dubbo-samples-api/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.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.dubbo.samples.provider;
import org.apache.dubbo.samples.api.GreetingsService;
public class GreetingsServiceImpl implements GreetingsService {
@Override
public String sayHi(String name) {
return "hi, " + name;
}
}
|
apache/dubbo | 1,061 | dubbo-remoting/dubbo-remoting-http3/src/main/java/org/apache/dubbo/remoting/http3/netty4/Constants.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.dubbo.remoting.http3.netty4;
public final class Constants {
public static final String PIPELINE_CONFIGURATOR_KEY = "http3PipelineConfigurator";
public static final CharSequence TRI_PING = "tri-ping";
private Constants() {}
}
|
apache/dubbo | 1,066 | dubbo-plugin/dubbo-qos/src/test/java/org/apache/dubbo/qos/legacy/service/generic/DemoService.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.dubbo.qos.legacy.service.generic;
import java.util.List;
public interface DemoService {
String sayName(String name);
void throwDemoException() throws DemoException;
List<User> getUsers(List<User> users);
int echo(int i);
}
|
apache/dubbo | 1,085 | dubbo-common/src/main/java/org/apache/dubbo/common/beans/ScopeBeanException.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.dubbo.common.beans;
public class ScopeBeanException extends RuntimeException {
public ScopeBeanException(String message, Throwable cause) {
super(message, cause);
}
public ScopeBeanException(String message) {
super(message);
}
}
|
apache/eagle | 1,027 | eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/template/AlertTemplateProvider.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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.eagle.alert.engine.publisher.template;
public class AlertTemplateProvider {
public static AlertTemplateEngine createAlertTemplateEngine() {
return new VelocityAlertTemplateEngine();
}
} |
apache/eagle | 1,081 | eagle-jpm/eagle-jpm-analyzer/src/main/java/org/apache/eagle/jpm/analyzer/Evaluator.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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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.eagle.jpm.analyzer;
import org.apache.eagle.jpm.analyzer.meta.model.AnalyzerEntity;
import org.apache.eagle.jpm.analyzer.publisher.Result;
public interface Evaluator<T extends AnalyzerEntity> {
Result.EvaluatorResult evaluate(T analyzerEntity);
}
|
apache/eagle | 1,082 | eagle-jpm/eagle-jpm-analyzer/src/main/java/org/apache/eagle/jpm/analyzer/Processor.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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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.eagle.jpm.analyzer;
import org.apache.eagle.jpm.analyzer.meta.model.AnalyzerEntity;
import org.apache.eagle.jpm.analyzer.publisher.Result;
public interface Processor<T extends AnalyzerEntity> {
Result.ProcessorResult process(T jobAnalysisEntity);
} |
apache/felix-dev | 1,026 | ipojo/runtime/core-it/ipojo-core-annotations-test/src/main/java/org/apache/felix/ipojo/runtime/core/test/components/MyComparator.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.felix.ipojo.runtime.core.test.components;
import java.util.Comparator;
public class MyComparator implements Comparator {
public int compare(Object o1, Object o2) {
return 0;
}
}
|
apache/felix-dev | 1,036 | ipojo/runtime/core-it/ipojo-core-handler-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/MyComponent.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.felix.ipojo.runtime.core.components;
import org.apache.felix.ipojo.runtime.core.services.MyService;
public class MyComponent implements MyService {
public void foo() {
// Nothing to do.
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.